Hi, i can't scrap odds data from betfair's website. I'm using PHP. I'm getting this error all the time:
Error:
Could anyone tell me what's wrong with my code?
Error:
Code:
response: {"faultcode":"Client","faultstring":"DSC-0008","detail":{}}
Could anyone tell me what's wrong with my code?
Code:
$url = "[URL="https://www.betfair.com/www/sports/navigation/facet/v1/search?_ak=nzIFcwyWhrlwYMrh&alt=json"]https://www.betfair.com/www/sports/n...wYMrh&alt=json[/URL]";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
#'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36',
'Accept: application/json',
'Content-Type: application/json',
'Referer: [URL]https://www.betfair.com/exchange/plus/football')[/URL]);
$postData = '[{ "params": {"filter": {}} }]';
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
# execute
$output = curl_exec($ch);
curl_close($ch);


Comment