PHP code example of yakeing / get_header
1. Go to this page and download the library: Download yakeing/get_header library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yakeing / get_header example snippets
$url = "https://github.com/yakeing/get_header";
$GetHeader = new GetHeader();
$Header = GetHeader->curlHeader($url);
var_dump($Header);
Array
(
[code] = 606
[Server] = nginx/1.4.1
[Date] = Tue, 15 Sep 2015 20:17:27 GMT
[Content-Type] = text/html
[Content-Length] = 464
[Connection] = close
[ETag] = "55b07eb9-1d0"
)
Array
(
[code] = 200
[Server] = nginx/1.4.1
[Date] = Tue, 15 Sep 2015 20:17:28 GMT
[Content-Type] = text/html; charset=utf-8
[Connection] = close
[Set-Cookie] = expires=Wed, 16-Sep-2015 20:17:28 GMT; path=/; domain=.sinacloud.com
[Expires] = Thu, 19 Nov 1981 08:52:00 GMT
[Cache-Control] = private
[Pragma] = no-cache
[Via] = 10.67.15.158
[Vary] = Accept-Encoding
)
Array
(
[code] = 200
[Server] = nginx/1.4.1
[Date] = Tue, 15 Sep 2015 20:17:28 GMT
[Content-Type] = image/jpeg
[Content-Length] = 40836
[Connection] = close
[Accept-Ranges] = bytes
[Access-Control-Allow-Origin] = *
[Access-Control-Max-Age] = 2592000
[Cache-Control] = public, max-age=31536000
[Content-Disposition] = inline; filename="weixin.jpg"
[Content-Transfer-Encoding] = binary
[ETag] = "FnDvgIWd1W48UL3WzKYwB7UfrS9w"
[Last-Modified] = Thu, 20 Aug 2015 04:01:43 GMT
[X-Log] = mc.g;IO:2
[X-Reqid] = FGAAAMR9NAAXQAQU
[X-Qiniu-Zone] = 0
[X-Via] = 1.1 ych69:80 (Cdn Cache Server V2.0), 1.1 xdx20:5 (Cdn Cache Server V2.0)
)