I\'m having troubles on making the PHP cURL library recognize the alias I created in my /etc/hosts
file.
This is what I have in my /etc/hosts
f
Solved using this url "http://192.168.0.20/" instead of "http://www.example.dev"
Also the "Host" header is needed...
$header = array
(
"Host: www.example.dev", // IMPORTANT
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3",
"Accept-Encoding: gzip,deflate,sdch",
"Accept-Language: it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4",
"Cache-Control: max-age=0",
"Connection: keep-alive",
);
curl_setopt($this->ch, CURLOPT_URL, 'http://192.168.0.20/');
curl_setopt($this->ch, CURLOPT_HTTPHEADER, $header);