file_get_contents获胜';我无法使用我的Google CSE API URL


file_get_contents won't work with my Google CSE API URL

我想使用file_get_contents从该Google CSE API https://www.googleapis.com/customsearch/v1?key={My-KEY-HERE}&cx=015435574869060730302:bycrgaosjuu&q=intitle:funny获取内容,但它返回我打开流失败:无错误,我尝试用http://更改https://但它返回了我http请求失败!HTTP/1.0 403禁止

如何使用file_get_contents获取Google CSE API内容?

我不认为file_get_contents函数有问题,你只是没有被授权,仔细检查密钥并检查google控制台API上的IP限制,检查应用程序是否在上