1
使用PHP與捲曲工作時。捲曲 - Retrive頭 - 空響應
我試圖只有recive頭。
我從以下網址:http://halens.se/kvinna-klader-bad-strand-baddrakter-93/baddrakt-074209/
我的設置是這樣的:
CURLOPT_AUTOREFERER => true,
CURLOPT_CERTINFO => false,
CURLOPT_CRLF => true,
CURLOPT_CONNECTTIMEOUT => 15,
CURLOPT_FAILONERROR => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_FORBID_REUSE => true,
CURLOPT_FRESH_CONNECT => true,
CURLOPT_HEADER => true,
CURLOPT_MAXREDIRS => 15,
CURLOPT_PROTOCOLS => CURLPROTO_HTTP,
CURLOPT_REDIR_PROTOCOLS => CURLPROTO_HTTP,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_TIMEOUT => 15,
CURLOPT_HEADER => true,
CURLOPT_NOBODY => true
但響應爲空.. 我做了什麼錯?或我們如何以另一種方式解決這個問題?
如果我不是改變最後設置:
CURLOPT_NOBODY => false
然後我得到的標題:
HTTP/1.1 301 Moved Permanently
Content-Length: 199
Content-Type: text/html; charset=UTF-8
Location: http://www.halens.se/kvinna-klader-bad-strand-baddrakter-93/baddrakt-074209/
Server: Microsoft-IIS/7.5
X-Powered-By: ARR/2.5
X-Powered-By: ASP.NET
Date: Sun, 06 Oct 2013 19:26:31 GMT
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 123009
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=wsp1hsdq1huvdnmr0jf42m1o; path=/; HttpOnly
Set-Cookie: ASP.NET_SessionId=wsp1hsdq1huvdnmr0jf42m1o; path=/; HttpOnly
Set-Cookie: FavoriteList=Id=593cd25e-3508-46a8-9596-66bd45caa335&Hash=PRHTFWRFDX; expires=Sat, 04-Jan-2014 20:26:32 GMT; path=/
Set-Cookie: InteractorId=wsp1hsdq1huvdnmr0jf42m1o_162_13_85_148; path=/
Set-Cookie: ClickTrail=074209; expires=Thu, 05-Dec-2013 20:26:32 GMT; path=/
X-Powered-By: ARR/2.5
X-Powered-By: ASP.NET
Date: Sun, 06 Oct 2013 19:26:32 GMT