Volodymyr Osypov blog

May 16, 2008

Pie diagram/chart in PHP using GD

Filed under: PHP — Tags: , , , , — admin @ 10:23 am

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…)

May 15, 2008

Simple WHOIS

Filed under: PHP — Tags: , , — admin @ 3:30 pm

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…)

April 21, 2008

Bar diagram (graph) in PHP using GD

Filed under: PHP — Tags: , , , — admin @ 10:25 pm

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…)

Powered by WordPress