Shoutbox

Xml show in mypsm - 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: Xml show in mypsm (/showthread.php?tid=92728)

Xml show in mypsm by s3seawa on 10-29-2009 at 09:10 PM

Hi.
http://shoutcast.mixstream.net/js/status/uk2-free:13390 this is my xml
i know Javascript code

code:
<script type="text/javascript" src="http://shoutcast.mixstream.net/js/status/uk2-free:13390">
You appear to have javascript turned off.
</script>

and php code
code:
<?php
// Change these to your online/offline messages //
$online = "Online"; // Displays when stream is online
$offline = "Offline"; // Displays when stream is offline
// don't edit below //
$ip = "87.98.170.118";
$port = "13390";
$fp = @fsockopen($ip,$port,$errno,$errstr,1);
if (!$fp)
    {
    $status = $offline;
    }
    else
    {
    fputs($fp, "GET /7.html HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n");
    while (!feof($fp))
        {
        $info = fgets($fp);
        }
    $split = explode(',', $info);
    if ($split[1] == "0" )
        {
        $status = $offline;
        }
    else
        {
        $status = $online;
        }
    }
echo $status;
?>


How a Jscript code?

code:
function OnEvent_Initialize(MessengerStart)
{
    var Message = "Clubmp3s Radio status script v0.01B ON";
    Message = MsgPlus.RemoveFormatCodes(Message);
    MsgPlus.DisplayToast("", Message);
}
var VersionFile = "http://clubmp3radio.co.cc/radio.txt";
var ScriptVersion = "0.01b";
var DownloadLocation = "http://clubmp3radio.co.cc/radio.plsc";

function checkUpdate(displayNoUpdateToast){
    var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    MyAddress=VersionFile+"?"+(Math.round(Math.random()*99999));
    xmlhttp.open("GET",MyAddress , true);
    xmlhttp.send("");
    xmlhttp.onreadystatechange=function(){
            if(xmlhttp.readyState==4){
                var resp = xmlhttp.responseText;
                if(resp != "Current Version: " + ScriptVersion)    {
                    resp=resp.split(" ");
                    if(resp[2]>ScriptVersion){
                        //New Version Available
                        MsgPlus.DisplayToastContact("Script Title","Message","","","openWebPage");
                    }
                }else if(displayNoUpdateToast&&resp=="Current Version: " + version){
                        //Current Version is up-to-date
                        MsgPlus.DisplayToastContact("Script Title", "Message");
                }
           
            }else{
        }
   
    }
}

function OnEvent_Uninitialize(MessengerExit)
{
    var Message = "Clubmp3s Radio status script v0.01B OFF";
    Message = MsgPlus.RemoveFormatCodes(Message);
    MsgPlus.DisplayToast("", Message);
}

I know a update script . And Messeng..
But how a code is offline and online my psm status.
Sorry i dont know englis.
Thanks help for me.