PHP gives us the opportunity to run a shell command, for example with exec() function. Let’s try it and write a simple whois service. Whois - is a *nix command which will show us the information about domain registration. Also we can check if the domain is free. Remember to check if your hosting provider turned exec() on. Usually this function is in disable_functions parameter in php.ini file. And also try if whois is allowed and works ok on your server. I tried it locally on Apache 2, PHP 5, Linux Fedora 8 and everything was fine.
(more…)
I really hate when a computer pretends to be smarter than me, that's why I turned off visual editor in Wordpress and now I can control everything and that's great. I don't have to battle anymore with changes editor made to my code! In this way I'm like Will Smith character in 'I, Robot' movie, believe every developer is on the same part.
Other thing is that I've installed nice plugin for code and now my code will be nice-looking like:
PHP
PHP:
-
<?
-
$str="Hello World";
-
-
?>
HTML
HTML:
-
-
-
-
Hello World!
-
</td>
-
</tr>
-
</table>
JavaScript
JAVASCRIPT:
-
<script type="text/javascript">
-
function sayit(str) {
-
alert(str);
-
}
-
-
var mystr='Hello world!';
-
sayit(mystr);
-
</script>
Also, Today I've got the free Ubuntu CD 
Btw, my Google interview is rescheduled to Friday.