I want to get the content of a domain, but from a different host (IP) than specified in the current A-Records.
I've solved this using cURL:
$headers = array("Host: www.example.com");
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$ip = "12.31.23.123";
$goto = "http://" . $ip . $_SERVER["REQUEST_URI"];
curl_setopt($ch, CURLOPT_URL, "$goto");
But i also need a way to get the images from the host!
Right now i only get the HTML code with cURL.
Any ideas?
Maybe a way to make the visitor download the image from the correct IP?