Curl請求,獲取HTTP 請求服務器響應碼
~~~
$ch = curl_init('http://www.jb51.net');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE); // 200
curl_close($ch);
~~~
~~~
服務器IP 121.199.26.199
返回狀態碼 200
網頁返回HEAD信息
Content-Type: text/html
Last-Modified: Mon, 01 Jan 2018 09:18:04 GMT
Accept-Ranges: bytes
ETag: "669bcb6de182d31:0"
Server: Microsoft-IIS/8.0
X-Powered-By: ASP.NET
Date: Tue, 02 Jan 2018 04:06:41 GMT
Content-Length: 28806
~~~
* * * * *
http://tool.chinaz.com/pagestatus/
頁面`https://www.guangshu.top/DragonApp/`檢測結果