PHP cUrl передача Header

Discussion in 'PHP' started by GoldenEagle, 27 Nov 2015.

  1. GoldenEagle

    GoldenEagle New Member

    Joined:
    4 Aug 2015
    Messages:
    8
    Likes Received:
    0
    Reputations:
    0
    Если я отправляю курл запрос на сайт с параметрами
    Code:
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
            'dddd: gfhfgh',
            "User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
            "X-Requested-With: XMLHttpRequest",
            "Referer: http://www.www.ru"
    ));
    curl_setopt($ch, CURLOPT_HEADER,1); 
    о в ответе от сервера должны быть мои параметры ?!
    В ответ приходит
    Code:
    HTTP/1.1 200 OK
    Date: Thu, 26 Nov 2015 23:11:51 GMT
    Server: Apache
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Set-Cookie: PHPSESSID=0dbobs7iicnmiicsu752bj1bh5; path=/
    X-Powered-By: PleskLin
    Connection: close
    Transfer-Encoding: chunked
    Content-Type: text/html
    
     
  2. TADIAMOND

    TADIAMOND Member

    Joined:
    19 Feb 2011
    Messages:
    140
    Likes Received:
    40
    Reputations:
    6