A
A
Alex Alex2015-11-27 02:14:39
PHP
Alex Alex, 2015-11-27 02:14:39

How to pass header cUrl php?

If I send a course request to a site with parameters

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);

That in the answer from the server there should be my parameters?!
In response comes
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

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
entermix, 2015-11-27
@entermix

That in the answer from the server there should be my parameters?!

No. The response comes from the server to which you make a request with your parameters

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question