Shoutbox

[Request] TinyURL Script - 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] TinyURL Script (/showthread.php?tid=72945)

[Request] TinyURL Script by Zerosan on 03-24-2007 at 04:42 AM

Hello Folks, I've got a little request here for a script.

It would be to bypass that dam* censoring of messages that wlm (msn) is doing...

Best would be a script where I can either have a input box that gives me out the tinyurl for the url I've entered or a script that automatically converts/creates a tinyurl for the urls that are used in a message.

I don't know if that is difficult or not.

the adress of that service is http://tinyurl.com

Greetings and Thanks
  Zerosan


RE: [Request] TinyURL Script by matty on 03-24-2007 at 07:22 AM

Note Worst Way Of Doing This!
To tired to do it any other way tho...

code:
function OnEvent_Initialize(MessengerStart){
    var _html = LoadXmlDoc('http://tinyurl.com/create.php?url=http://google.ca');
    var _link_pos = _html.indexOf('<blockquote><b>http://tinyurl.com/');
    _html = _html.substr(_link_pos, _html.length)
    _link_pos = _html.indexOf('http://tinyurl.com/');
    _html = _html.substr(_link_pos, _html.length)
    _link_pos = _html.indexOf('</b>');
    _html = _html.substr(0, _link_pos)
    Debug.Trace(_html);
}

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

RE: [Request] TinyURL Script by Eljay on 03-24-2007 at 08:38 AM

Wow that is dodgy Matty ^^ :P

Anyway I had nothing better to do, so here it is.
All this script does is replace all sent urls with a TinyURL.

[Download TinyURL v1.02]


RE: [Request] TinyURL Script by Felu on 03-24-2007 at 08:48 AM

@Eljay : 1) www.feluowns.com or anything in that format won't work.
2) The URL sent needs to be modified a bit. Eg. http://www.feluowns.com changed to http://preview.tinyurl.com/34woy4 when i should change to http://tinyurl.com/34woy4

Haven't noticed any other bugs yet.


RE: [Request] TinyURL Script by Eljay on 03-24-2007 at 08:53 AM

1) Yeah I guess it should match that too... *gets to work*
2) The preview thing is not a bug, it's intended to stop it being used for masking malicious urls.


RE: [Request] TinyURL Script by Felu on 03-24-2007 at 08:55 AM

quote:
Originally posted by Eljay
2) The preview thing is not a bug, it's intended to stop it being used for masking malicious urls.
Ah, i just looked at the code and thought the same.
RE: [Request] TinyURL Script by Eljay on 03-24-2007 at 09:01 AM

Updated previous attachment with version 1.01 which now supports urls without http:// in front as well.

[Click here if you are too lazy to scroll up]


RE: [Request] TinyURL Script by Zerosan on 03-24-2007 at 04:17 PM

Yes, but there is another problem now, it doesn't support urls with http:// anymore ^^.

for example, if I write http://www.Zerosan.de it results in a tinyurl with the content: http://http://www.Zerosan.de

could that be fixed to?^^

but except that, it very nice^^ Big Thx


RE: [Request] TinyURL Script by Eljay on 03-24-2007 at 05:13 PM

Ok after much testing and cursing and very little coding, got it working. Attachment updated above.


RE: [Request] TinyURL Script by Zerosan on 03-27-2007 at 11:42 PM

thx, now it works quite nice^^