I was sending the same headers as a browser request and there's quite a
few.The info is gzip encoded I just assume that IE6 inflates it.
fputs($fp, "Accept: image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/vnd.ms-excel, application/msword,
application/x-shockwave-flash, */*\r\n");
fputs($fp, "Referer:
http://www.betfair.com/betting/LoadBetsDataAction.do?mi=2702263&SO=BL&MB=on&AR=on &MBV=AVG&BI=on\r\n");
fputs($fp, "Accept-Language: en-gb\r\n");
fputs($fp, "Accept-Encoding: gzip, deflate\r\n");
fputs($fp, "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1;
www.ASPSimply.com; .NET CLR 1.0.3705; .NET CLR 1.1.4322)\r\n");
fputs($fp, "Host: $host\r\n");
the above plus all the cookie data
require_once "Request.php";
$req =& new HTTP_Request("http://www.betfair.com/");
$response = $req->sendRequest();
if (PEAR::isError($response)) {
echo $response->getMessage();
} else {
print_r($req->getResponseCookies());
}
echo $response;
I've tried curl but with no luck thats why I wanted to give pear a go
but couldn't find any decent examples to start off.