Shoutbox

[Request] Display IP In PM - 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: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Request] Display IP In PM (/showthread.php?tid=66965)

[Request] Display IP In PM by Ickbal on 10-04-2006 at 08:22 PM

Say, if you turned it on, and typed in your PM:
[IP] is my I.P. Today
Because my I.P Changes every day, and its a lot of work to check and update pm every day because I run a server on GTA SA:MP so it needs to display my I.P so people can connect.
Thanks in advance
Tom


RE: [Request] Display IP In PM by matty on 10-05-2006 at 04:41 AM

code:
function OnEvent_SigninReady(sEmail){
    Messenger.MyPersonalMessage = String(LoadXmlDoc('http://www.msgpluslive.net/software/getip.php')).replace(/*/gi, '')+' is my IP today';
}

function LoadXmlDoc(sUrl){
    Interop.Call('wininet.dll', 'DeleteUrlCacheEntryW', sUrl);
    var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    xmlhttp.open('GET', sUrl, false);
    xmlhttp.send();
    return xmlhttp.responseText;
}

RE: [Request] Display IP In PM by Ickbal on 10-05-2006 at 07:31 PM

Thanks, didn't expect a reply so quickly


RE: [Request] Display IP In PM by Spunky on 10-05-2006 at 08:04 PM

The replace part of that code needs editing as it is commenting out the function... Tried using an escape character, but I'm not to good with them ;)

EDIT: My very simple solution lol

code:
function OnEvent_Initialize(){
myVar = LoadXmlDoc('http://www.msgpluslive.net/software/getip.php')
myVar = myVar.replace("*", '');
myVar = myVar.replace("*", '');
Messenger.MyPersonalMessage = "My IP is: "+myVar
}

function LoadXmlDoc(sUrl){
Interop.Call('wininet.dll', 'DeleteUrlCacheEntryW', sUrl);
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open('GET', sUrl, false);
xmlhttp.send();
return xmlhttp.responseText;
}

EDIT2: Wheres my rep? :p
RE: [Request] Display IP In PM by Ezra on 10-05-2006 at 08:26 PM

Or just get a DNS name :S

Install a little program that changes the dns ip every time it changes.

DynDNS
NO-IP

They work wonders :P