PHP QUERY HELP - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: PHP QUERY HELP (
/showthread.php?tid=603110)
PHP QUERY HELP -
EmiGjoni - 18.03.2016
Hello
I tried all samp queries and they didn't work. All i want to get is Players Online info in server.
Please help me out with new samp query and some examples where it is used.
Код:
<div class="bner">
<font style="font-weight:700;">Server IP:</font> 127.0.0.1:7777 <font style="font-weight:700;">Players online:</font> 1/40
</div>
Re: PHP QUERY HELP -
SickAttack - 18.03.2016
That's not even PHP.
Something in PHP would be as follows:
PHP код:
echo $server_info['players_online'];
But I doubt that's how the query system handles data.
Re: PHP QUERY HELP -
EmiGjoni - 18.03.2016
The file is .php but it has html things like buttons and others, php mixed with html
Re: PHP QUERY HELP -
SickAttack - 18.03.2016
What's the variable which the player count is stored in?
Echo it out, like below:
PHP код:
<div class="bner">
<font style="font-weight:700;">Server IP:</font> 127.0.0.1:7777 <font style="font-weight:700;">Players online:</font> <?php echo variable; ?>
</div>
Replace "variable" found in "<?php echo variable; ?>" for the variable the player count is stored in.
Re: PHP QUERY HELP -
EmiGjoni - 18.03.2016
Yeah but where can i get samp query because i tried some of them which i found in ****** and didn't work.
Can you provide me any download link?
Thank you for replying
Re: PHP QUERY HELP -
SickAttack - 18.03.2016
Oh, I thought you already had it.
https://sampforum.blast.hk/showthread.php?tid=104299
Re: PHP QUERY HELP -
EmiGjoni - 18.03.2016
Tried it not in my script and show blank
Re: PHP QUERY HELP -
BroZeus - 19.03.2016
The samp query apis doesn't work with free hosts and many premium hosts too as the usage of socket functions is deprecated in them. For them to work you need a VPS or run it on localhost.