Sign in to follow this  

IP address

This topic is 4778 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just to expand on doynax's answer, you'd need to open a socket to www.whatismyip.com on port 80, and send:

GET / HTTP/1.0
Host: www.whatismyip.com
Connection: Close



Where each line ends with a "\r\n" pair, and the whole thing ends with a blank line (so the last 4 chars are "\r\n\r\n")
Then read the input until you get "<TITLE>Your ip is ", and then read the next part for the IP.
You could also use a library to make this stuff easier, I believe hplusplus has a very small bit of code to do this. Have a look in the Multiplayer and Network Programming forum.

Share this post


Link to post
Share on other sites
Quote:
Original post by H0bbes
I like to know if i can get IP address from Machine that is connected with Proxy?
Obviously confusingly worded.

Answer: no. Not unless they tell you. Some proxies will send headers that look like

X-Proxy-For: xxx.xxx.xxx.xxx

or something, but these are rare. really rare. nonexistant rare.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Wouldn't this give the IP address of the proxy server?

Yes, I thought that was what you wanted.
So do you want to know the internal address of a machine behind a proxy from the outside? Or perhaps something else entirely..

Share this post


Link to post
Share on other sites

This topic is 4778 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

Sign in to follow this