Old 27th August 2007, 18:18   #1
sheffieldbleep
Junior Member
 
Join Date: Nov 2006
Location: Sheffield
Posts: 19
Help me with my script

I have this advanced stats script on my site: -

PHP Code:
<div style="Visibility: Hidden; Position: Absolute;"> 
<? 
$open 
fsockopen("86.123.33.111","8000"); 
if (
$open) { 
fputs($open,"GET /7.html HTTP/1.1\nUser-Agent:Mozilla\n\n"); 
$read fread($open,1000); 
$text explode("content-type:text/html",$read); 
$text explode(",",$text[1]); 
} else { 
$er="Connection Refused!"; } 
?> 
</div> 
<? 
if ($text[1]==1) { $state "Up"; } else { $state "Down"; } 
if (
$er) { echo $er; exit; } 
echo 
"
<body style=margin-left:0px>
<font face=verdana size=1 color=#FFFFFF>
Listeners: 
$text[0] of $text[3] ($text[4] Unique)<br> 
Listener Peak: 
$text[2]<br> 
Server State: <b>
$state</b><br> 
Bitrate: 
$text[5] Kbps<br> 
Current Song: 
$text[6]<br>
</font></body>"
;?>
What would be the best way to integrate the song history/played.html (last 10 songs played) into the above script?

Cheers.
sheffieldbleep is offline   Reply With Quote
Old 28th August 2007, 18:58   #2
gendou
Junior Member
 
Join Date: Aug 2007
Posts: 2
PHP Code:
$data shell_exec('curl [url]http://86.123.33.111:8000/played.html[/url] -s -A Mozilla');

if(!
preg_match('/<b>Current Song<.b><.td><.tr>(.*?)<.table>/'$data$matches))
        
// format $matches[1] however you like 
gendou is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump