我正在使用 PHP cURL 使用我的 Google API 密钥检索 Google 图书信息,但是每当我放置任何 http 引荐来源网址时都会出现 ipRefererBlocked 错误。请问有什么想法吗?
HTTP 引荐来源网址
http://mylibrarymanager.com/*
https://mylibrarymanager.com/*
http://www.mylibrarymanager.com/*
https://www.mylibrarymanager.com/*
www.mylibrarymanager.com/*
代码
$url = 'https://www.googleapis.com/books/v1/volumes?q=isbn:9788420636641&projection=lite&maxResults=1&printType=books&key='.$myApiKey;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$json = curl_exec($ch);
curl_close($ch);