|
|
#1 |
|
Junior Member
|
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 |
|
|
|
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|