You are here: Re: Querying a HL Server « PHP Programming Language « IT news, forums, messages
Re: Querying a HL Server

Posted by Jerry Stuckle on 08/08/06 01:53

bryan wrote:
> I'm trying to query a HL Server and return the "status" of it. I'm
> unsure of how to do this exactly so I need some help, what I have so
> far is as follows...
> 1. <?php
> 2. // Host / Port Settings:
> 3. $host = '70.86.248.86';
> 4. $socket = fsockopen('udp://' . $host, 27015, $errno, $errstr);
> 5. if ($socket) {
> 6. echo 'working';
> 7. if (fwrite($socket, 'status')) {
> 8. echo fread($socket, 128);
> 9. } else {
> 10. echo 'Problems writing';
> 11. }
> 12. } else {
> 13. echo 'not working';
> 14. }
> 15. ?>
> Does anybody know how to do this properly or succeeded in doing this
> before?
> I am trying to query a counter-strike server and return the current
> players/max players.
>

Did you try asking the people running the server? They should know what
protocol you need to use.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация