1
I’m having an error in that line, and I don’t know why, I tried everything and I didn’t get it.
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>";
}
?>
I was seeing this now that it may be disabled, hostgator usage there is a problem...
– Josimara
Would via . htaccess be possible?
– Thyago ThySofT
allow_url_fopen this as (on)
– Josimara
In the error shows that this occurs on line 39 of the kick.php file, where is this content? It will be easier to see where the error is being pointed.
– Thyago ThySofT
Anyway, you tried exception
$scfp = @fsockopen($ver['ip'], $ver['porta'], &$errno, &$errstr, 10);
?– Thyago ThySofT
The Error is on that line there she is the 39
– Josimara
When I put the @ error did not appear but the system did not work.
– Josimara
Right. @Josimara, I didn’t notice..... seeing this line, these lines
&
are too much, aren’t they? Try so:$scfp = @fsockopen($ver['ip'], $ver['porta'], $errno, $errstr, 10);
– Thyago ThySofT