Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
Sim00n - 02.11.2010
Do You guys know, for how long does the script is trying to connect to the server ?
I'm using this script for little server panel, and when the server is down, each page is loading very slowly.
Or is there any way to time the check function ?
Regards, Sim00n.
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
HACKHERS - 05.11.2010
Links was Dead
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
Westie - 06.11.2010
Well done. The links should be online in about two hours or so, methinks.
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
Typhome - 06.11.2010
Westie, why SAMPQueryAPI doenst work?
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
Westie - 06.11.2010
Quote:
Originally Posted by Typhome
Westie, why SAMPQueryAPI doenst work?
|
Gee, I have no idea! Why doesn't it work for you?
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
Shinoda90 - 08.11.2010
Link is Dead! Please upload it again!
Respuesta: Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
zSuYaNw - 08.11.2010
Quote:
Originally Posted by Shinoda90
Link is Dead! Please upload it again!
|
Link [DEAD]
please.
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
sciman001 - 24.04.2011
Код:
<html>
<body>
<?php
require "SampQueryAPI.php";
$query = new SampQueryAPI(192.168.1.109', '7777');
if($query->isOnline())
{
$aInformation = $query->getInfo();
$aServerRules = $query->getRules();
?>
<b>General Information</b>
<table width="400">
<tr>
<td>Hostname</td>
<td><?= htmlentities($aInformation['hostname']) ?></td>
</tr>
<tr>
<td>Gamemode</td>
<td><?= htmlentities($aInformation['gamemode']) ?></td>
</tr>
<tr>
<td>Players</td>
<td><?= $aInformation['players'] ?> / <?= $aInformation['maxplayers'] ?></td>
</tr>
<tr>
<td>Map</td>
<td><?= htmlentities($aInformation['mapname']) ?></td>
</tr>
<tr>
<td>Weather</td>
<td><?= $aServerRules['weather'] ?></td>
</tr>
<tr>
<td>Time</td>
<td><?= $aServerRules['worldtime'] ?></td>
</tr>
<tr>
<td>Version</td>
<td><?= $aServerRules['version'] ?></td>
</tr>
<tr>
<td>Password</td>
<td><?= $aInformation['password'] ? 'Yes' : 'No' ?></td>
</tr>
</table>
<br />
<b>Online Players</b>
<?php
$aPlayers = $query->getDetailedPlayers();
if(!is_array($aPlayers) || count($aPlayers) == 0)
{
echo '<br /><i>None</i>';
}
else
{
?>
<table width="400">
<tr>
<td><b>Player ID</b></td>
<td><b>Nickname</b></td>
<td><b>Score</b></td>
<td><b>Ping</b></td>
</tr>
<?php
foreach($aPlayers as $sValue)
{
?>
<tr>
<td><?= $sValue['playerid'] ?></td>
<td><?= htmlentities($sValue['nickname']) ?></td>
<td><?= $sValue['score'] ?></td>
<td><?= $sValue['ping'] ?></td>
</tr>
<?php
}
echo '</table>';
}
}
?>
</body>
</html>
The ip is my pc's ip.. i have also tried my public ip... still no luck. WHAT SHOULD I DO

Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
tony_fitto - 28.04.2011
I have a problem here,
This is what I get on my website
Код:
isOnline()) { $aInformation = $query->getInfo(); $aServerRules = $query->getRules(); ?> General Information
Hostname
Gamemode
Players /
Map
Weather
Time
Version
Password
Online Players getDetailedPlayers(); if(!is_array($aPlayers) || count($aPlayers) == 0) { echo '
None'; } else { ?> '; } } ?>
Player ID Nickname Score Ping
This is what my Code looks like
Код HTML:
<html>
<body>
<?php
require "SampQueryAPI.php";
$query = new SampQueryAPI(188.138.79.5', '6600');
if($query->isOnline())
{
$aInformation = $query->getInfo();
$aServerRules = $query->getRules();
?>
<b>General Information</b>
<table width="400">
<tr>
<td>Hostname</td>
<td><?= htmlentities($aInformation['hostname']) ?></td>
</tr>
<tr>
<td>Gamemode</td>
<td><?= htmlentities($aInformation['gamemode']) ?></td>
</tr>
<tr>
<td>Players</td>
<td><?= $aInformation['players'] ?> / <?= $aInformation['maxplayers'] ?></td>
</tr>
<tr>
<td>Map</td>
<td><?= htmlentities($aInformation['mapname']) ?></td>
</tr>
<tr>
<td>Weather</td>
<td><?= $aServerRules['weather'] ?></td>
</tr>
<tr>
<td>Time</td>
<td><?= $aServerRules['worldtime'] ?></td>
</tr>
<tr>
<td>Version</td>
<td><?= $aServerRules['version'] ?></td>
</tr>
<tr>
<td>Password</td>
<td><?= $aInformation['password'] ? 'Yes' : 'No' ?></td>
</tr>
</table>
<br />
<b>Online Players</b>
<?php
$aPlayers = $query->getDetailedPlayers();
if(!is_array($aPlayers) || count($aPlayers) == 0)
{
echo '<br /><i>None</i>';
}
else
{
?>
<table width="400">
<tr>
<td><b>Player ID</b></td>
<td><b>Nickname</b></td>
<td><b>Score</b></td>
<td><b>Ping</b></td>
</tr>
<?php
foreach($aPlayers as $sValue)
{
?>
<tr>
<td><?= $sValue['playerid'] ?></td>
<td><?= htmlentities($sValue['nickname']) ?></td>
<td><?= $sValue['score'] ?></td>
<td><?= $sValue['ping'] ?></td>
</tr>
<?php
}
echo '</table>';
}
}
?>
</body>
</html>
Any one that can help me out?
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
Slice - 28.04.2011
Do you have PHP installed?
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
Westie - 28.04.2011
Quote:
Originally Posted by sciman001
Код:
$query = new SampQueryAPI(192.168.1.109', '7777');
|
You haven't made it a string.
Код:
$query = new SampQueryAPI('192.168.1.109', '7777');
Fixed!
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
falenone1 - 28.04.2011
Not working
Parse error: syntax error, unexpected T_DNUMBER in /home/fmodding/public_html/query/jura1.php on line 7
Edit: Now I get white screen only
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
Westie - 28.04.2011
No, it does work. It'd help if I knew what the problem was though.
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
falenone1 - 28.04.2011
Aha
getting now that
Notice: fwrite() [function.fwrite]: send of 15 bytes failed with errno=1 Operation not permitted in /home/fmodding/public_html/query/SampQueryAPI.php on line 61
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
Westie - 28.04.2011
Your host has disabled sockets.
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
tony_fitto - 28.04.2011
Quote:
Originally Posted by Slice
Do you have PHP installed?
|
Of Course I have
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
sciman001 - 29.04.2011
i have this same issue.. and it kinda pisses me off... i am using wanp-server... and i kinda need this to work... Once i find my pass to my hosting.. ill try it there. BUT, if someone could like... help us with this.. that would b great. maybe someone could give a tutorial THAT ACTUALLY WORKS... anyway.. yeah. THX...
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
Westie - 29.04.2011
Quote:
Originally Posted by sciman001
i have this same issue.. and it kinda pisses me off... i am using wanp-server... and i kinda need this to work... Once i find my pass to my hosting.. ill try it there. BUT, if someone could like... help us with this.. that would b great. maybe someone could give a tutorial THAT ACTUALLY WORKS... anyway.. yeah. THX...
|
My tutorial does work. Once again, your PHP instance may disable sockets - the answer is to enable sockets!
Edit: Oh, I've found your topic:
https://sampforum.blast.hk/showthread.php?tid=250884
Next time, read the first post. You need to enter in your own server IP and port.
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
XFlawless - 18.06.2011
Quote:
Originally Posted by Sascha
could you specify this?^^ (tell me how)
|
UDP port open ?
Edit:
http://php.net/manual/en/function.fsockopen.php
Re: [PHP] Server Query and RCON API - Be an admin at ease! (16/02/2010) -
Sascha - 18.06.2011
how can I check that? (any php code or so? -- using cpanel)