kai4711
Joined: 21 Nov 2007 Posts: 30
|
Posted: Wed Dec 12, 2007 8:18 pm Post subject: Kill source via php-Script |
|
|
Hi Guys,
I tried to modify a shoutcast-kick-source script to work with icecast but it doesnt realy work...
Does anyone have some ideas?
| Code: |
<?php
function kick($host,$port,$mount,$username,$password) {
$fp=@fsockopen($host,$port,&$errno,&$errstr,10);
if (!$fp) {$success = false;}
else {
fputs($fp,"GET /admin/killsource.xsl?mount=/$mount HTTP/1.1");
fputs($fp,"User-Agent:KaiZilla");
fputs($fp,"Host: $host");
fputs($fp,"Authorization: Basic ".base64_encode($username.":".$password)."rnrn");
fputs($fp,"");
fclose($fp);
$success = true;
}
return $success;
}
?>
|
It echoes true but the source is still connected to the server...
Thank you in advance,
Kai |
|