http://www.phpit.net/article/creatin...ne-script-php/