rendered paste bodyfunction getURL($url,$proxy,$post='',$ref='') {
$data = '';
global $cookie;
if(!file_exists($cookie)) {
$file = fopen($cookie,"w");
fclose($file);
}
$ch = curl_init() or die(curl_error());
curl_setopt($ch, CURLOPT_URL,$url);
//curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);// or die(curl_error($ch));
curl_close($ch);
return $data;
}