Raised This Month: $ Target: $400
 0% 

Getting localhost IP adress


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-27-2007 , 17:58   Getting localhost IP adress
Reply With Quote #1

I need function, that get's localhost IP, I mean not 127.0.0.1 or 162.168.0.1 but real IP, like 78.72.25.11. I need it to create some functions, if server's ip isn't that, what it should be. Anybody?
hleV is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-27-2007 , 18:49   Re: Getting localhost IP adress
Reply With Quote #2

Use get_user_ip(0,....) to get the server's ip. If it returns 192.168 or 127.0, then that is because you are behind a router and you can't prevent that
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
RaYden
Member
Join Date: Sep 2007
Old 10-28-2007 , 06:35   Re: Getting localhost IP adress
Reply With Quote #3

You could use port forwarding ... some modern routers do that automatically (like mine for instance :p )
RaYden is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 10-28-2007 , 06:39   Re: Getting localhost IP adress
Reply With Quote #4

Quote:
Originally Posted by RaYden View Post
You could use port forwarding ... some modern routers do that automatically (like mine for instance :p )
only if upnp is enabled on your router and your pc

ontopic:
try to connect to an webserver which tells you your outbound ip and check it then
__________________
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode