PHP
-
26 April, 2009
Found a great function for image resize in php. It requires php >= 4.3.0.
I found the source in
http://www.akemapa.com/2008/07/10/php-gd-resize-transparent-image-png-gif/<? function resize($img, $w, $h, $newfilename) { # //Check if GD extension is loaded # if (!extension_loaded('gd') && !extension_loaded('gd2'))... -
06 January, 2009
Here is a very simple structure of how to use curl with post method –
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL,'http://example.com/target.php'); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST , 1);// setting up to use post method curl_setopt($ch, CURLOPT_POSTFIELDS, array("fieldName1"=>"data1","fieldName2"=>"data2")); $content = curl_exec($ch); curl_close($ch); -
05 January, 2009
I created a cron job which needs to run every 5 minutes. So it was sending me 12 emails per hour and my inbox got overwhelmed by email pretty soon. I had plesk control panel and plesk won’t let you leave email field empty so I started to look...
-
14 June, 2008
Here is a good article on how to store file in mysql using php
-
26 April, 2009
Found a great function for image resize in php. It requires php >= 4.3.0.
I found the source in
http://www.akemapa.com/2008/07/10/php-gd-resize-transparent-image-png-gif/<? function resize($img, $w, $h, $newfilename) { # //Check if GD extension is loaded # if (!extension_loaded('gd') && !extension_loaded('gd2'))... -
06 January, 2009
Here is a very simple structure of how to use curl with post method –
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL,'http://example.com/target.php'); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST , 1);// setting up to use post method curl_setopt($ch, CURLOPT_POSTFIELDS, array("fieldName1"=>"data1","fieldName2"=>"data2")); $content = curl_exec($ch); curl_close($ch); -
05 January, 2009
I created a cron job which needs to run every 5 minutes. So it was sending me 12 emails per hour and my inbox got overwhelmed by email pretty soon. I had plesk control panel and plesk won’t let you leave email field empty so I started to look...
-
14 June, 2008
Here is a good article on how to store file in mysql using php