Old 17th December 2007, 20:27   #1
Junior Member
Join Date: Aug 2006
Posts: 3
Start/Stop Sc_Trans via a PHP/CGI webpage

Hi All,

I'm just wondering if there's a way of using PHP or CGI (Perl) to allow DJ's to start and stop sc_trans without having to give out the shoutcast admin password.

Thanks In Advance
r27smith200245 is offline   Reply With Quote
Old 18th December 2007, 01:11   #2
Senior Member
Join Date: Mar 2005
Location: ontario
Posts: 402
Send a message via Yahoo to networknova
for php you can use:
shell_exec('shell command string here');
exec('shell command string here');

php references can be found here http://php.net

for perl/cgi you could use:
system('shell command string here');

perl references can be found here http://search.cpan.org/~nwclark/perl/

hope this helps
networknova is offline   Reply With Quote
Old 21st December 2007, 16:56   #3
Senior Member
Join Date: Sep 2006
Posts: 254
You could set up a PHP page where they can go on to and kick the source. When kicked, sc_trans will attempt to reconnect every 10 seconds so your DJs won't need to restart sc_trans.

I've just knocked this up, I haven't tested it but it should work.

PHP Code:
// Server Settings //
$ip "213.456.789.10";
$port "8000";
$pass "changeme";
// Messages //
$success_message "The source has been kicked, you can now connect";
$error_message "Connection refused, check that server is online";
// No need to edit below //
$fp = @fsockopen($ip$port$errno$errstr4);
if (!
fputs($fp"GET /admin.cgi?pass=$pass&mode=kicksrc HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n");
BELLonline is offline   Reply With Quote
Old 18th February 2009, 05:22   #4
Junior Member
Join Date: Feb 2009
Location: USA - Florida
Posts: 15
Send a message via AIM to Johnnyboy928
Actually this is perfect man.. Just what I was looking for... of course I can pretty it up and add stats to it for Moderators of the broadcast... Thanks man...
Johnnyboy928 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