Is there a way (In PB native code) to determin the IP address on a server?
Not everyone knows how to look for thier IP address in windows, And I certainly don't know how to find it in linux. So I thought that it would be easier to display it to the player who is hosting a game so that he/she can tell everyone else on a LAN...
Or better yet, has anyone figured out how to search a LAN for existing game servers (like every other LAN game does)?
IP Address?
Code: Select all
InitNetwork() : ExamineIPAddresses()
IPAddress.s = IPString(NextIPAddress())
Debug IPAddress
just tell them to look at http://www.whatismyip.com/
or make a simple parser to retriecve data from this page
so you can retrieve ip from router if the are behind NAT
or make a simple parser to retriecve data from this page
so you can retrieve ip from router if the are behind NAT
Christos
It's amazing that someone has made a website to display someone's real ip address, yet his code is actually incorrectplouf wrote:just tell them to look at http://www.whatismyip.com/
or make a simple parser to retriecve data from this page
so you can retrieve ip from router if the are behind NAT

For a large majority of people his script will show the ip address of the proxy server they are using. He should display the HTTP_X_FORWARDED_FOR var and not REMOTE_ADDR
Something like http://www.auditmypc.com/myinfo.asp will display your real ip address even if you're using a proxy server.