官网如下:http://www.pinnaclesports.com/information.aspx?id=36128
官方网站有限五秒更新。
有没有什么方式可以让时间缩短到1秒 或2-3秒的。
Api 数据抓取方式如下:
$url = 'https://api.pinnaclesports.com/v1/feed?sportid=3&leagueid=233&oddsformat=2';
$credentials = base64_encode("账号:密码");
$header[] = 'Content-length: 0';
$header[] = 'Content-type: application/json';
$header[] = 'Authorization: Basic ' . $credentials;
$httpChannel = curl_init();
curl_setopt($httpChannel, CURLOPT_URL, $url);
curl_setopt($httpChannel, CURLOPT_RETURNTRANSFER, true);
curl_setopt($httpChannel, CURLOPT_HTTPHEADER, $header);
curl_setopt($httpChannel, CURLOPT_SSL_VERIFYPEER, false);
$data = curl_exec($httpChannel);
curl_close($httpChannel);
有没有那位神人有这方面的经验可以供小弟参考一下 ,好让我有个方向可以来进行实验。当然用过这个api的人肯定不多。但求有神人有,「类似」这方面,「规避限时更新」的经验可分享,感谢
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
使用五个账号