Prev Previous Post   Next Post Next
Old 10th December 2003, 01:27   #1
TheDude1884
Junior Member
 
Join Date: Dec 2003
Posts: 10
Send a message via ICQ to TheDude1884 Send a message via AIM to TheDude1884
How do shoutcast scripts (ie. now playing) work?

I'm using this small php script to generate Now Playing for my web site...
/*
<?
$add = 'thedude188.no-ip.org';

################# DONT MODIFY STUFF BELOW HERE ############################



header ("Content-type: image/jpeg");
$sp = 50666;
$sock = socket_create(AF_INET, SOCK_STREAM, 0);
if (@socket_connect($sock, $add, $sp)) {
$st = 'hello satan, what are you playing?';
socket_write($sock,$st,strlen($st));
$tmp = 'NP: '.socket_read($sock,2048);
if (rand(0,40) == 24) { $tmp = $tmp.""; }
} else { $tmp = 'Server down or unreachable..'; }
$im = imagecreate (6*strlen($tmp),14);
$background_color = imagecolorallocate ($im, 0, 0, 0);
$text_color = imagecolorallocate ($im, 255, 255, 255);
imagestring ($im, 2, 0, 0, $tmp, $text_color);
imagejpeg ($im,'','40');
socket_close($sock);
?>*/

pretty simple script made by Satansomebody lol.
Anyway I was just changing some things in the script to see what the output would be on my site. I tried changing $sp to some other number and that pretty much "broke" the script . I was just wondering what can I change in this script to output max listeners or previously played or some other stats for my site.
Is there a site for out there for ppl that make scripts like this? Maybe I could make my own script to suit my own needs.
TY
TheDude1884 is offline   Reply With Quote
 
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