shedokan Posted June 26, 2009 Share Posted June 26, 2009 I am using curl to login to a website, and I don't want the website to log the servers IP, I want it to log my ip. is there a way to do that? thanks. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted June 26, 2009 Share Posted June 26, 2009 Nope. The IP address that the final server sees comes directly from the TCP/IP data packet and it will be the IP address of your server. Quote Link to comment Share on other sites More sharing options...
.josh Posted June 26, 2009 Share Posted June 26, 2009 You could run the script from your own computer. Quote Link to comment Share on other sites More sharing options...
shedokan Posted June 26, 2009 Author Share Posted June 26, 2009 thanks, but I need it to run on a real server. is there any way to do this in php? Quote Link to comment Share on other sites More sharing options...
blaatschaap Posted June 26, 2009 Share Posted June 26, 2009 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 Quote Link to comment Share on other sites More sharing options...
shedokan Posted June 26, 2009 Author Share Posted June 26, 2009 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. Quote Link to comment Share on other sites More sharing options...
blaatschaap Posted June 26, 2009 Share Posted June 26, 2009 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) Quote Link to comment Share on other sites More sharing options...
shedokan Posted June 26, 2009 Author Share Posted June 26, 2009 thanks to all, but there is no solution for my answer. Quote Link to comment Share on other sites More sharing options...
.josh Posted June 26, 2009 Share Posted June 26, 2009 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. Quote Link to comment Share on other sites More sharing options...
shedokan Posted June 26, 2009 Author Share Posted June 26, 2009 thanks, for the explanation. I now understand why it isn't possible. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.