(string) HTTP/1.1 200 OK
Content-Language: en
Content-Type: application/json; charset=utf-8
Date: Wed, 24 Oct 2012 21:38:50 GMT
Server: nginx
Vary: Accept-Language, Cookie, Accept-Encoding
X-Ratelimit-Limit: 5000
X-Ratelimit-Remaining: 4976
transfer-encoding: chunked
Connection: keep-alive
從上面的頭我想要的值爲X-Ratelimit-剩餘。我如何將它存儲在php中的變量中。HTTP頭,獲取特定值
用php curl和http-headers重新簽名 – gmo
您接受的解決方案似乎比使用'get_headers()'更復雜。爲什麼更好? – Barmar
請參閱http://tools.ietf.org/html/rfc2616#section-6和http://php.net/http_parse_headers – hakre