我正在使用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);