PDA

View Full Version : [PHP] Radio help.



Fiendly
14-05-2011, 07:01 AM
Hello Habboxers,

Currently looking for a DJ says part for a script or more-so the 'Now Playing'.
I had the code a long time ago but had forgotten it.

Anyone know the specific?
Don't want to go fishing through long extents, just want a small simple short code.

Thanks for your time,
Fiendly

Aidonia
19-05-2011, 07:44 PM
I'd assume [/URL][url=http://www.streamsolutions.co.uk/scripts/radio_stats.zip]this (http://[URL) works, but I haven't been able to test it. I'd provide you with functional code myself, but I'm slightly rusty in PHP as I've been away from it for the past year.

Fiendly
21-05-2011, 06:08 AM
I'll go through it later on, haven't got the code on my hard drive (Back everything up) so yeah.
Thanks, Ill see if it works after cropping and that.

Pegle
21-05-2011, 11:18 AM
Might sound stupid, but have you tried HabboEmotion? The script is usually quite short and gives you what you need.

Fiendly
22-05-2011, 12:38 AM
Yeah, some are really complex.. I've got everything else but the title.

aidant
24-05-2011, 11:31 AM
<?php
$config["host"]="your host";
$config["port"]="your port";

/*Coded by Aidan Taylor - www.aidantaylor.net*/
function _DownloadFile(){
global $config;
$tmpStr=null;
$fSock=@fsockopen($config["host"],$config["port"],$errno,$errstr,5);
if ($fSock){
@fwrite($fSock,"GET /7.html HTTP/1.0\r\n"."User-Agent: XML Getter (Mozilla Compatible)\r\n\r\n");
while(!feof($fSock)){
$tmpStr.=fgets($fSock,1024);
}
}
@fclose($fSock);
return $tmpStr;
}
$strResult=_DownloadFile();
$stats = array();
if(stristr($strResult, "HTTP/1.0 200 OK")===FALSE){
$blnStatus=false;
} else {
$blnStatus=true;
preg_match("/(\d+),(\d+),(\d+),(\d+),(\d+),(\d+),(.*)/",$strResult,$stats);
array_shift($stats);
}
echo $stats[6];
?>

Want to hide these adverts? Register an account for free!