PHP: Save Image From URL
Posted on Jun 26, 2013You can save image from url in PHP you should first get thesource of the image from the URL and after that save image to your Server.
1. Using PHP function file_get_contents()
$contents = file_get_contents('http://mydomain.com/folder/image.jpg');
PHP: XML to CSV
Posted on Jun 25, 2013To create a CSV file from a XML in PHP 5.0+ it's very easy. We will use the SimpleXML extension that come from PHP 5.0+
SimpleXML reads an entire XML into an object that we can iterate through his properties. To write to the csv output file we will use fputcsv.
fputcsv formats a line as CSV and writes it to the file.
Scripts with PHP for CPanel
Posted on Jun 24, 2013To automate an action in PHP for cpanel it's very simple. You just need to know some information about your CPanel.
$cpanel_user - the username that you use to log into your cpanel.
$cpanel_password - the password for cpanel.
$cpanel_host - your cpanel host. You can find this after you login to cpanel, right before 'http://' until ':'.
$cpanel_skin - cpanel skin. You can find this after '/frontend/', default is 'x'.