I have a PHP problem with my web page. I state that I am developing the site for a FiveM server.
In this page I have to enter the number of players and the number of maximum players that the FiveM server can host.
This is what I wrote:
<?php
$file = file_get_contents('http://fivem.lrfreeroamitalia.it:30120/dynamic.json');
$decode = json_decode($file, true);
$clients = isset($decode['clients']);
$svmaxclients = isset($decode['sv_maxclients']);
echo $decode['clients'] . '/' . $decode['sv_maxclients'];
?>
The problem with this code is that it gives me this error PHP:
Warning: file_get_contents(http://fivem.lrfreeroamitalia.it:30120/dynamic.json): failed to open stream: Connection timed out in /web/htdocs/www.lrfreeroamitalia.it/home/index.php on line 49
Port 30120 of the remote server is open.
P.S. I use Aruba.it as a provider