Public feed
#724732
function getURL($url,$proxy='',$post='',$ref='',$showh = true) {
$data = '';
global $cookie;
global $proxy;
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)");
if($ref!='') {
$ref = 'Referer: '.$ref;
$header = array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2","Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5","Accept-Language: en-us,en;q=0.5","Accept-Encoding: *","Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7","Keep-Alive: 300","Connection: keep-alive",$ref,"Expect: ");
}
else {
$header = array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2","Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5","Accept-Language: en-us,en;q=0.5","Accept-Encoding: *","Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7","Keep-Alive: 300","Connection: keep-alive","Expect: ");
}
curl_setopt($ch, CURLOPT_HEADER, $showh);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt ($ch, CURLOPT_TIMEOUT, 20);
if($post!='') {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
if($proxy != '') {
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt ($ch, CURLOPT_PROXY, $proxy);
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);// or die(curl_error($ch));
curl_close($ch);
return $data;
}
HTTP/1.1 302 Moved Temporarily
Cache-control: no-cache, no-store
Pragma: no-cache
Location: https://www.google.com/accounts/NewAccount?service=mail&continue=http%3A%2F%2Fmail.google.com%2Fmail%2Fe-11-1088dc7c356253a03135b920e1c34191-291dcffe720b9b0170979425feae13e6fb7dbb15&type=2
Content-Type: text/html; charset=UTF-8
Content-Length: 378
Server: GFE/1.3
Date: Wed, 03 Oct 2007 20:48:47 GMT
<HTML>
<HEAD>
<TITLE>Moved Temporarily</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Temporarily</H1>
The document has moved <A HREF="https://www.google.com/accounts/NewAccount?service=mail&continue=http%3A%2F%2Fmail.google.com%2Fmail%2Fe-11-1088dc7c356253a03135b920e1c34191-291dcffe720b9b0170979425feae13e6fb7dbb15&type=2">here</A>.
</BODY>
</HTML>