0
我的用戶登錄到我的應用程序,應用程序發送idtoken到我的服務器,服務器發送請求到谷歌,谷歌發送userdata到我的服務器,服務器把它放在我的數據庫。工作5個月。 現在:訪問googleapis失敗
如果我在網頁瀏覽器中鍵入
https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=
,我會用我的名字來取得的JSON等以毫秒爲單位,因爲它(從我的應用程序中提取我的谷歌帳戶的+ idtoken)應該。
今天,自6小時後,如果我的phpfile運行命令
$url = "https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=".$idtoken;
$str =file_get_contents($url);
的頁面加載和裝載終於沒有返回值。
我想這個版本,以獲得以.json文件
$ch = curl_init($url); // such as http://example.com/example.xml
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
$str= curl_exec($ch);
curl_close($ch);
有沒有修復。
我無法安裝composer,因爲沒有root權限。
我聯繫了客戶支持,他們告訴我服務器端的一切都很好。
你可以從你的服務器的控制檯捲曲/ ping網址嗎? – Andy
捲曲也不會工作!加載時間也很長! '無法連接到www.googleapis.com端口443:連接超時 ' –
如果curl/ping未在服務器的命令行上使用該地址,則可能是路由/防火牆問題。我會嘗試traceroute或要求您的託管服務提供商進行調查 – Andy