I'm having an error on this line, and I do not know why, I tried everything and did not get results.
Error:
Warning: fsockopen () [function.fsockopen]: unable to connect to srvstm.com (Connection refused) in kick.php on line 39
<?php
$sql = mysql_query("SELECT * FROM dados_radio");
$ver = mysql_fetch_array($sql);
$kikar = $_POST['kikar'];
if($_POST){
mysql_query("INSERT INTO logs_radio(usuario, ip, data) VALUES ('".$_SESSION['usuario_painel']."','".$_SERVER['REMOTE_ADDR']."','".time()."') ");
$scfp = fsockopen($ver['ip'], $ver['porta'], &$errno, &$errstr, 10);
if($scfp){
fputs($scfp,"GET /admin.cgi?pass=".$ver['senha_kick']."&mode=kicksrc HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
while(!feof($scfp)) {
$page .= fgets($scfp, 1000);
}
fclose($scfp);
}
echo "<script>alert('Boa sorte. Processo feito com sucesso.')</script>";
}
?>