Jump to content

CURL + HTTP_X_FORWARDED_FOR


cyfer65
 Share

Recommended Posts

You can use the CURLOPT_HTTPHEADER option. Keep in mind that the name of the header is really X-Forwarded-For. So...

$ch = curl_init('http://dawhois.com/my_ip_address.php');$headers = array('X-Forwarded-For: ' . $_SERVER['REMOTE_ADDR']//Add additional headers here.);curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);$result = curl_exec($ch); curl_close($ch);

[edit]Damn... beated to it :) [/edit]

Link to comment
Share on other sites

Shows the same thing...Perhaps the site uses a different technique to detect proxies, or it only assumes a proxy if the proxy's IP (i.e. your server's IP) is among a certain whitelist of known proxies.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...