滚天在线
分享互联网,分享快乐!www.Gonten.com

php       这两天利用Google搜索结果处理一些东西,做好了,上传到主机上竟然无法使用,本地速度快,一切正常。检查了很多地方都没问题,把搜索URL换成百度的后竟然OK,写了个简单的代码:
<?php
$f = file_get_contents(“http://www.google.cn/search?rls=ig&hl=zh-CN&source=hp&q=123&aq=f&oq=”);
echo $f;
?
这是获取Google搜索“123”的结果URL源代码,上传到空间后,竟然显示以下错误:

Gonten_get1

Your client does not have permission to get URL /search?rls=ig&hl=zh-CN&source=hp&q=123&aq=f&oq= from this server. (Client IP address: 203.171.239.166)

Please see Google’s Terms of Service posted at http://www.google.com/terms_of_service.html

If you believe that you have received this response in error, please report your problem. However, please make sure to take a look at our Terms of Service (http://www.google.com/terms_of_service.html). In your email, please send us the entire code displayed below. Please also send us any information you may know about how you are performing your Google searches– for example, “I’m using the Opera browser on Linux to do searches from home. My Internet access is through a dial-up account I have with the FooCorp ISP.” or “I’m using the Konqueror browser on Linux to search from my job at myFoo.com. My machine’s IP address is 10.20.30.40, but all of myFoo’s web traffic goes through some kind of proxy server whose IP address is 10.11.12.13.” (If you don’t know any information like this, that’s OK. But this kind of information can help us track down problems, so please tell us what you can.)

We will use all this information to diagnose the problem, and we’ll hopefully have you back up and searching with Google again quickly!

Please note that although we read all the email we receive, we are not always able to send a personal response to each and every email. So don’t despair if you don’t hear back from us!

Also note that if you do not send us the entire code below, we will not be able to help you.

Best wishes,
The Google Team

似乎是无权限,真的很郁闷~~

相关文章

本文地址:http://www.gonten.com/file_get_contents-google/ 转载请务必以超链接形式注明!