在Foursquare应用程序上获取500个内部服务器错误



我在我的foursquare应用程序上获得了" 500 internal server error"。在服务器端,错误日志文件上存在超时错误:

PHP警告: file_get_contents(https://api.foursquare.com/v2/users/selfs/selfs?oauth_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&v = 20161129):无法打开流:连接时间

多数民众赞成在&正在像& a m p一样转换;"在file_get_contents

顺便说一句,本地没有问题。有什么问题?代码,我的主机还是foursquare?谢谢。

大多可能是您的服务器无法连接到外部资源,例如,由于firewall restrictions

尝试使用cURL,它为您提供了比File_get_contents

更多的选项和控制

或可能是执行问题。在文件获取内容之前尝试ini_set('max_execution_time', 300); ...

最新更新