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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.