I've just run into a problem with my ISP who it seems refuses to allow me to use fsockopen
telling me its a security risk and that I have to find an alternative suggesting that I use perl.
Does anyone have an alternative to fsockopen possibly using perl for the script below?
<?php
// fetches server information from minequery.
function fetch_server_info($ip, $port){
$socket = fsockopen($ip, $port, $errno, $errstr, 0.5);
if($socket === false){
return false;
}
fwrite($socket, "QUERY_JSON
");
$responce = stream_get_contents($socket);
return json_decode($responce, true);
}
?>