Jump to content

Change curl IP to users IP?


shedokan

Recommended Posts

thanks, but I need it to run on a real server.

 

is there any way to do this in php?

i dunno if that can but you could add proxy to cURL...

 

curl_setopt($ch, CURLOPT_PROXYPORT, "PORT");
curl_setopt($ch, CURLOPT_PROXY, "tunnel/ip");
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "user:password"); //if needed only

 

hope this helps you abit.

 

~Blaatschaap

blaatschaap, thanks for this but I really need it to use the users IP address.

and I can't use the users computer as proxy.

won't be a option to do then.

and the given ip will always come from the server.

(Offtopic : Except with mail both ip's will be added server&user)

sorry man, but what you want is just not possible.  At best, you can open up and alter packets being sent, but if you do that, responses will be sent to the client, not back to the server. I'm not sure that php is even capable of doing that, actually.  You'd probably have to use a lower level language.  But even so, this will cause the connection to break, as your server will expect responses back to know that packets were received, and visa versa from them.  You can't just insert a computer as the middleman, and yet at the same time, not be the middleman.  If the target computer thinks its coming from some other computer, it's going to respond to that computer, not back to your server, and your server is also going to hang, because it is expecting a response. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.