|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 |
Junior Member
Join Date: Aug 2008
Posts: 9
|
Looking For A Kick Source Script For My Internet Station With A Specific Requirement
Hi There!
I am looking for the code for a working kick source script to kick the playing stream off the air so the dj can connect. The one specific requirement about this script that I have is that I only want the auto dj stream to be kicked. I don't want people to be able to kick a live dj off the air. Any help would be appreciated. From KN |
![]() |
![]() |
![]() |
#2 |
Forum King
Join Date: Jul 2004
Location: E*arth
Posts: 3,031
|
if you know a bit of php its simple because
you just need to use, http://yourServer:8000/admin.cgi?pas...d&mode=kicksrc So Long, and Thanks for All the Fish. ![]() ![]() |
![]() |
![]() |
![]() |
#3 |
Forum King
Join Date: Jul 2004
Location: E*arth
Posts: 3,031
|
here is a cut down version of the required code
it may contain errors as im in a rush so if users wish to correct me then do so. <?php /****************************************/ $scip = "localhost"; $scport = "8000"; $scpass = "AdminPassword"; /****************************************/ $scCon = fsockopen("$scip", $scport, &$errno, &$errstr, 30); if(!$scCon) { $scsuccess=1; } if($scsuccess!=1){ fputs($scCon,"GET /admin.cgi?pass=$scpass&mode=kicksrc HTTP/1.0\r\nUser-Agent: Shoutcast Source Kicker (Mozilla Compatible)\r\n\r\n"); } exit; ?> So Long, and Thanks for All the Fish. ![]() ![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Join Date: Sep 2006
Posts: 254
|
What I do is with the AutoDJ stream I set the 'Stream IRC' setting to [playlist] (it can be anything), as no one uses the IRC setting anyway. Then it is easy enough to write a PHP script that checks that the IRC setting says [playlist] and then kicks it.
If IRC is blank or anything other than [playlist] then the script exits and the page refreshes after 5 seconds. You don't have to use the IRC setting, it can be done with any of them but I chose that one because it's the least used. I know it's a bit of a bodge, but it works! |
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Aug 2008
Location: Marseille (FRANCE)
Posts: 9
|
I made it for u in PHP CLI.
Usage: nano kicksource.sh , paste it, chmod +x kicksource.sh , and ./kicksource.sh . U can also do it as kicksource.php ; then remove the first line and replace chr(10) by '<br>'. PHP Code:
|
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: Aug 2008
Posts: 9
|
I just have one question about something you wrote regarding the tool you used to create this thing:
[B]I made it for u in PHP CLI. Usage: nano kicksource.sh , paste it, chmod +x kicksource.sh , and ./kicksource.sh . U can also do it as kicksource.php ; then remove the first line and replace chr(10) by '<br>'. [PHP] #!/usr/bin/php <?php /* kicksource.sh [usage ./kicksource.sh] Those kicksource.sh things..Do I need some sort of a tool or can I just create a kicksource.php, put all that code in, and I'll be ready to go? Thanks so much, this means a lot. From KN |
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Aug 2008
Location: Marseille (FRANCE)
Posts: 9
|
Yes u can.
PHP Code:
|
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: Oct 2008
Location: London
Posts: 1
|
this doesnt work for some reason...
ERROR i get... Warning: fputs(): supplied argument is not a valid stream resource in /home/MYSITE/public_html/kicksource.php on line 16 09:41:00 : Error: Unable to connect to stream. |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|