The Daily Click ::. Forums ::. Klik Coding Help ::. Get External IP
 

Post Reply  Post Oekaki 
 

Posted By Message

Velovix



Registered
  23/06/2008
Points
  118
2nd June, 2009 at 17:43:38 -

Is there any object that can get your external IP automatically? I'm trying to make a game where the players host the games, but I would rather the people not have to enter their IP when they host, and that instead, the program automatically gets it and sends it to the lobby. I've tried Mooclick, Moogame, and OINC, and they either got 125.0.0.1 (which I believe equates to Localhost) or my internal IP (192.168.xx.xxx)
Am I overlooking something, or is there another extension I have to use?

 
Ooh, so now you expect me to have a sig too?

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
2nd June, 2009 at 19:58:12 -

You can make a php script that returns it to moosock, or live receiver. That's how I'd do it anyway.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
3rd June, 2009 at 00:04:38 -

Whenever I need it I just download http://whatismyip.org/ as a text file. UrbanMonk's method is more reliable because whatismyip.org may go down some day. Write a simple php script to do the exact same thing and then retrieve the file.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
3rd June, 2009 at 01:24:50 -

http://jsoftgames.com/getip.zip

Enjoy

Just stick this on your server, and then use the GET command with live receiver, and you will get the remote ip in a flash!

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
3rd June, 2009 at 01:38:55 -

that is if he has a host and its on a server that supports php (although if he does it should support it)

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
3rd June, 2009 at 04:42:22 -

There are many many free webhosts that support php if if he does not have a paid server. Even if they might be much slower.
http://www.0php.com/free_PHP_hosting.php

Google "Free php hosting".

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy
   

Post Reply



 



Advertisement

Worth A Click