<?php
set_time_limit(0);
error_reporting(0);
$url = "http://aadhocc.com/demo/updates/update.zip";
$fp = fopen('../update.zip', 'w+');//This is the file where we save the    information

//exit;
$ch = curl_init(str_replace(" ","%20",$url));//Here is the file we are downloading, replace spaces with %20
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_FILE, $fp); // write curl response to file
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch); // get curl response
curl_close($ch);
fclose($fp);

echo "Done";
exit;

?>
