12.11.2013, 18:32
Hello, i use QueryAPI for my private samp list and when i via ftp clients send it to webhosting file server it doesn't work but in localhost server it works
Code:
Please help me i try set CHMOD to 777 but nothing change :/
Code:
Код:
<?php require "tools/SampQueryAPI.php"; $res = dibi::query('SELECT [id] FROM [servers]'); $crows = count($res); ?> <center> <table border="1"> <thead> <tr> <th>IP</th> <th>Jmeno</th> <th>Sloty</th> <th>Status</th> <th>Mapa</th> </tr> <tbody> <?php for($i=1; $i < $crows+1;$i++) { $result = dibi::query('SELECT * FROM [servers] WHERE [ID] = %i',$i); $row = $result->fetch(TRUE); $sip = explode(':',$row['IP']); try { $rQuery = new QueryServer($sip[0],$sip[1]); $sInfo = $rQuery->GetInfo(); $sStatus = "ONLINE"; } catch (QueryServerException $pError) { $sStatus = "OFFLINE"; } ?> <tr> <td><?php echo($row['IP']); ?></td> <td><?php echo($sInfo['Hostname']); ?></td> <td><?php echo($sInfo['Players']);echo('/');echo($sInfo['MaxPlayers']);?> </td> <td><?php echo($sStatus); ?> </td> <td><?php echo($sInfo['Map']); ?></td> </tr> </tbody> <?php } ?> </table> </center> <?php ?>