Shoutbox

[Help with script] Getting text from websites - 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: [Help with script] Getting text from websites (/showthread.php?tid=72418)

[Help with script] Getting text from websites by skyserpent on 03-07-2007 at 06:09 PM

I have created a PHP script to get the total ammount of downloads of a certain script from the msgplus script database. I was wondering how I could get that text and then show it in my Display Name.

http://www.adenbeckitt.info/dloads/index.php?script=142-CrazyText (total downloads of CrazyText)

go to http://www.adenbeckitt.info/dloads/index.php to find out how to use it.


RE: [Help with script] Getting text from websites by pollolibredegrasa on 03-07-2007 at 06:19 PM

This post may be of some help :)


RE: [Help with script] Getting text from websites by skyserpent on 03-07-2007 at 06:45 PM

thanks man.

I have:

code:
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("GET", "http://www.adenbeckitt.info/dloads/index.php?script=142-CrazyText", true);

xmlhttp.onreadystatechange=function() {
   if (xmlhttp.readyState==4) {
Messenger.MyPersonalMessage = Messenger.MyPersonalMessage+" | CrazyText downloads: "+xmlhttp.responseText;
   }
         }
xmlhttp.send('');

but i need it to check every so often and add it on the end. any ideas? also if you just add it on the end then it would come out as:

eg.
Personal Message | CrazyText downloads: 29900 | CrazyText downloads: 29923
RE: [Help with script] Getting text from websites by foaly on 03-07-2007 at 06:53 PM

you could do something like:

code:
var n = psm.indexOf("CrazyText downloads:");
psm = psm.substring(0,n) +"here the next downloads"


RE: [Help with script] Getting text from websites by skyserpent on 03-07-2007 at 06:57 PM

thanks but to be honest i have decided that i cannot be bothered really. lol. If anyone wants to carry it on they can. Thanks to everyone that helped.


RE: [Help with script] Getting text from websites by CookieRevised on 03-07-2007 at 07:25 PM

PS: if you want this into a script, you don't need the php script thuogh. What you did in the php script can be done directly within a Plus! script too ;)


RE: [Help with script] Getting text from websites by skyserpent on 03-07-2007 at 07:27 PM

yeah, but i didn't know how :P