PHP QUERY HELP
#1

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&nbsp;&nbsp;&nbsp;&nbsp;<font style="font-weight:700;">Players online:</font> 1/40
		</div>
Reply
#2

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.
Reply
#3

The file is .php but it has html things like buttons and others, php mixed with html
Reply
#4

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&nbsp;&nbsp;&nbsp;&nbsp;<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.
Reply
#5

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
Reply
#6

Oh, I thought you already had it.

https://sampforum.blast.hk/showthread.php?tid=104299
Reply
#7

Tried it not in my script and show blank
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)