CURL the headers. I don't understand what's the problem?

Seems blunted... C standard localhost send:

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "");

$aHeaders = array('Host:', 

curl_setopt($ch, CURLOPT_HTTPHEADER, $aHeaders);


In other words, I want to say the website I, being on the main page, requesting another page.

But in HttpFox I see this exchange:

(Request-Line) GET /abc/script.php HTTP/1.1
Host localhost
Referer http://localhost/abc/

ie disguise failed website sees that it is trying to parse from localhost'and. Hence, all resulting redirects, the lack of distribution of information etc. Where blunted?
July 9th 19 at 13:27
1 answer
July 9th 19 at 13:29
Read the documentation and you will be happy:
curl_setopt($ch, CURLOPT_REFERER, '');

Find more questions by tags PHPWeb Development