Shoutbox

(!IP) in latest version not giving proper external IP - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: WLM Plus! Bug Reports (/forumdisplay.php?fid=7)
+----- Thread: (!IP) in latest version not giving proper external IP (/showthread.php?tid=31787)

(!IP) in latest version not giving proper external IP by TheDude on 09-20-2004 at 05:50 PM

The command is giving the IP of the NTL proxy type thing that us NTL users get, which is 80.4.224.4, instead of my real IP address.   The only IP plugin etc. for messeger plus! which gives my real IP address is "IP Plug MSN Client" made by Hah which can be found here: http://shoutbox.menthix.net/showthread.php?tid=19...d=183650#pid183650

It's not a problem because I have the plugin, I'd just thought I'd say.


RE: (!IP) in latest version not giving proper external IP by Patchou on 09-20-2004 at 06:38 PM

Hum.. do you have an idea how this plugin gets your IP? The way I work is simply to send a request to my server and ask it about your IP as it sees it.


RE: (!IP) in latest version not giving proper external IP by lopardo on 09-20-2004 at 06:56 PM

BTW, TheDude, do websites like http://www.whatismyip.com/ give you your correct IP?


RE: (!IP) in latest version not giving proper external IP by TheDude on 09-20-2004 at 07:33 PM

No whatsmyip.com doesn't get it right, but sites such as http://www.grc.com 's "shieldsup" does.  Most forums get its wrong I find, but some get it right it varies from site to site.

The plugin does much the same as plus: it accesses a web page done in PHP and located at http://members.lycos.co.uk/itstom/ipplug/ip.php

Tis a PHP script don't know if that makes any difference, I think it just depends on the way of retrieving the IP with HTML or whatever, some methods are more accurate.


RE: (!IP) in latest version not giving proper external IP by Millenium_edition on 09-20-2004 at 07:34 PM

http://www.showmyip.com <-- is that one correct? :s

and btw, i'm pretty sure all the servers are the same. :s


RE: (!IP) in latest version not giving proper external IP by TheDude on 09-20-2004 at 07:41 PM

Yes www.showmyip.com gets it right (Y)


RE: (!IP) in latest version not giving proper external IP by Patchou on 09-22-2004 at 12:42 AM

Well, then, I'd like to know what PHP parameter they use... if you can get this, I'll fix your problem asap.


RE: (!IP) in latest version not giving proper external IP by brian on 09-22-2004 at 01:32 AM

I'll guess that's just an auto-assigned variable by php

code:
$_SERVER['REMOTE_ADDR'];

Could be used...

code:
print $_SERVER['REMOTE_ADDR'];

RE: (!IP) in latest version not giving proper external IP by Patchou on 09-22-2004 at 03:36 AM

Well, that's exactly what I use right now :)


RE: (!IP) in latest version not giving proper external IP by WDZ on 09-22-2004 at 04:04 AM

REMOTE_ADDR is the most reliable/common, and can be trusted. However, it doesn't always show the correct IP if you're using a proxy. For that, you need HTTP_X_FORWARDED_FOR, but keep in mind that it can be spoofed, or contain dodgy values such as "unknown" or multiple IPs added by multiple proxies. :dodgy:

Very simple example that doesn't check if HTTP_X_FORWARDED_FOR is valid (I'm lazy :p)...

code:
if($_SERVER['HTTP_X_FORWARDED_FOR']) {
    echo $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
    echo $_SERVER['REMOTE_ADDR'];
}

RE: (!IP) in latest version not giving proper external IP by TheDude on 09-22-2004 at 04:03 PM

Yes I just tested WDZ's script on my server and it works :D

I'm not sure exactly how NTL works, it itsn't a regular proxy server as I don't have to configure programs, and I can use other proxies succesfully (Ie MessengerDiscovery) so it could be a kind of a half proxy, does anyone know?


RE: (!IP) in latest version not giving proper external IP by WDZ on 09-22-2004 at 04:20 PM

Well, their proxy is probably transparent, which means most users don't even know it's there, because it doesn't have to be configured. Many ISPs use proxies to cache content and save bandwidth.


RE: (!IP) in latest version not giving proper external IP by Kryptonate on 09-22-2004 at 05:38 PM

I'm having problems with the (!IP) command too. It gives a totally different IP than the one I have. IP-sites show me the correct IP.


RE: (!IP) in latest version not giving proper external IP by Osiris on 09-22-2004 at 06:00 PM

my (!IP) is working fine shows my external ip, but when i type (!IP):27015 it displays my ip but puts :27015:27015 so it displays it twice :S is there any reason for this? (27015 is the halflife port, i sometimes run a listen server on my pc (incase your wondering why i use this))

==>solved my problem, i had a quick text of /ip - (!IP):27015 - which would have conflicted i suppose and so added the :27015 twice, but i renamed it so its all fine now :)


RE: (!IP) in latest version not giving proper external IP by TheDude on 09-23-2004 at 04:03 PM

Is the script going to be changed to obtain the correct IP or is it to be left as it is then?

Don't mean to be pushy just enquiring :D  Like I said its not a problem cos I cant just use the plugin, but its an inaccuracy.


RE: (!IP) in latest version not giving proper external IP by Patchou on 09-24-2004 at 01:06 AM

Well, I just changed it and I tried to make it smart enough to know if the var contains an ip or some garbage... let me know if it works for me... on my internet connection, the new variable just returns nothing so I cant test if it works :)


RE: (!IP) in latest version not giving proper external IP by TheDude on 09-26-2004 at 12:04 PM

Yes it works perfectly now thank you very much :D