Log in

View Full Version : Radio Statistics



Javascrypt
11-11-2008, 05:43 PM
Anybody tell me the php or w.e it is coded in. Just so i can put my radio details into it and it shows the dj name and song playing & listeners.

Kevin
11-11-2008, 06:26 PM
Here's a basic shoutcast script (http://www.habboring.com/counter/click.php?id=2)

Javascrypt
11-11-2008, 07:00 PM
Here's a basic shoutcast script (http://www.habboring.com/counter/click.php?id=2)
Im with Xeodomains.
They dont support PHP.
They dont even have a cpanel just ftp.

HotelUser
11-11-2008, 08:43 PM
The best one is GMTT stats script (regardless of whether or not you have PHP. If you don't you're not going to get very far):

<?php
// ©2004-2005 Daniel Brown http://www.gmtt.co.uk
$scfp = fsockopen("iphere", portbasehere, &$errno, &$errstr, 30);
if(!$scfp) {
$scsuccs=1;
echo'<font=verdana size=2><center>Your radio is <b>offline</b>!</center></font>';
}
if($scsuccs!=1){
fputs($scfp,"GET /admin.cgi?pass=administratorpasswordhere&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
while(!feof($scfp)) {
$page .= fgets($scfp, 1000);
}
$loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS");
$y=0;
while($loop[$y]!=''){
$pageed = ereg_replace(".*<$loop[$y]>", "", $page);
$scphp = strtolower($loop[$y]);
$$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed);
if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE)
$$scphp = urldecode($$scphp);
$y++;
}
$pageed = ereg_replace(".*<SONGHISTORY>", "", $page);
$pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed);
$songatime = explode("<SONG>", $pageed);
$r=1;
while($songatime[$r]!=""){
$t=$r-1;
$playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]);
$playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
$song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]);
$song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]);
$song[$t] = urldecode($song[$t]);
$dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
$dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
}
fclose($scfp);
}
if($streamstatus == "1"){
echo'
<center>
<font face=verdana size=2>Your radio is <font color=green><b>online</b>!</font><br><br>
<font face="verdana" size="2"><b>Current DJ: </b>'.$servertitle.'<br>
<b>Listeners: </b>'.$currentlisteners.'<br>
<b>Now Playing: </b> '.$song[0].'<br>
<b>Recent Songs:</b><br>
<b>1.</b> '.$song[1].'<br>
<b>2.</b> '.$song[2].'<br>
<b>3.</b> '.$song[3].'<br>
<b>4.</b> '.$song[4].'<br>
<b>5.</b> '.$song[5].'<br>
</font>';
}
if($streamstatus == "0")
{
echo'<font face=verdana size=2><center>Your radio is <font color=green><b>online</b></font>. But nobody is DJing!</center></font>';
}

?>

Calon
12-11-2008, 11:29 AM
You should highly consider moving web hosts if they don't support PHP.

Kevin
12-11-2008, 01:52 PM
SAWHosting.com are quite cheap, a good host, and support PHP. there your best bet i reckon.

HotelUser
12-11-2008, 07:05 PM
SAWHosting.com are quite cheap, a good host, and support PHP. there your best bet i reckon.

I'm guessing since he doesn't presently have PHP with his host that he's with a free host. There's a great deal of good free webhosts.

Kevin
13-11-2008, 10:30 AM
I'm guessing since he doesn't presently have PHP with his host that he's with a free host. There's a great deal of good free webhosts.

You must have searched my name, and picked out post's you would like to correct me on.

He did not request a free host, i suggested one where he could get a very good deal.

if your looking for a free host 000webhost is the way foward. (http://www.000webhost.com/)
000Webhost provide Free Web Hosting with PHP,MYSQL and cPanel, no ads

HotelUser
13-11-2008, 11:15 AM
You must have searched my name, and picked out post's you would like to correct me on.
You think so much of yourself, don't you?

He did not request a free host, i suggested one where he could get a very good deal.
He didn't request for any hosts at all. You shouldn't correct people when you're wrong.

if your looking for a free host 000webhost is the way foward. (http://www.000webhost.com/)
000Webhost provide Free Web Hosting with PHP,MYSQL and cPanel, no ads
Now you're giving him the address to a free host, when you told me he didn't ask for a free host..idiot..

Kevin
13-11-2008, 12:53 PM
You think so much of yourself, don't you?He didn't request for any hosts at all. You shouldn't correct people when you're wrong.
Now you're giving him the address to a free host, when you told me he didn't ask for a free host..idiot..

I was posting the URL of the freehost for you, as you were unable to do so yourself, and left him wondering...

HotelUser
13-11-2008, 07:45 PM
I was posting the URL of the freehost for you, as you were unable to do so yourself, and left him wondering...

I assumed he was capable of using Google. Excuse me if I don't jump to his every want;).

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