Let’s continue creating functions for diagrams building. Today we’ll program a function which builds pie diagram using GD library for PHP. As in our example bar diagram our function will have array $ar ($ar[’name’]=data;) and $title for diagram title as input.
(more…)
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…)
Today we’ll program a function which biulds bar graph using GD library for PHP. For each bar diagram we need datas and also names for these data. So in our example our function will have array $ar ($ar[’name’]=data;) and $title for diagram title as input. (more…)