What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] TinyURL Script

[Request] TinyURL Script
Author: Message:
Zerosan
New Member
*


Posts: 9
– / Male / –
Joined: Jul 2006
O.P. [Request] TinyURL Script
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
03-24-2007 04:42 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Request] TinyURL Script
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;
}
03-24-2007 07:22 AM
Profile E-Mail PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Request] TinyURL Script
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]

.plsc File Attachment: TinyURL.plsc (986 bytes)
This file has been downloaded 1555 time(s).

This post was edited on 03-24-2007 at 05:14 PM by Eljay.
03-24-2007 08:38 AM
Profile PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: [Request] TinyURL Script
@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.
03-24-2007 08:48 AM
Profile E-Mail PM Web Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Request] TinyURL Script
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.
03-24-2007 08:53 AM
Profile PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: [Request] TinyURL Script
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.
03-24-2007 08:55 AM
Profile E-Mail PM Web Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Request] TinyURL Script
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]
03-24-2007 09:01 AM
Profile PM Find Quote Report
Zerosan
New Member
*


Posts: 9
– / Male / –
Joined: Jul 2006
O.P. RE: [Request] TinyURL Script
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

This post was edited on 03-24-2007 at 04:20 PM by Zerosan.
03-24-2007 04:17 PM
Profile E-Mail PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Request] TinyURL Script
Ok after much testing and cursing and very little coding, got it working. Attachment updated above.
03-24-2007 05:13 PM
Profile PM Find Quote Report
Zerosan
New Member
*


Posts: 9
– / Male / –
Joined: Jul 2006
O.P. RE: [Request] TinyURL Script
thx, now it works quite nice^^
03-27-2007 11:42 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On