0

I have the code below in one of my scripts but every time it runs it uses my IP address. How I can make it use the IP address of the user? I was reading about curl_setopt() which allows you to set the IP address. Can someone assist me with that?

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, '' . $stuff_link[0] . '');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, '' . $stuff_refurl . '');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
// curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, false);
$html = curl_exec($ch);
curl_close ($ch);
Sᴀᴍ Onᴇᴌᴀ
  • 8,218
  • 8
  • 36
  • 58
user2002220
  • 115
  • 1
  • 1
  • 10

2 Answers2

1

the short answer is: you cant do that.

DiverseAndRemote.com
  • 19,314
  • 10
  • 61
  • 70
0

This is - fortunately - impossible.

In fact, you can if your user has an http proxy server installed...

Alain Tiemblo
  • 36,099
  • 17
  • 121
  • 153