howto query a "server"

liunx

Guest
I asked a game creater howto view a game server's status in php. He replied that all I have to do is query the game server and, the game server will respond with an array of information. The problem is I don't know what kinda query he's talking about. I researched "query" at php.net and only found database stuff. I want something similar to this...

<!-- m --><a class="postlink" href="http://www.bfstats.com/livestats.php?ip=216.183.112.199&port=23000">http://www.bfstats.com/livestats.php?ip ... port=23000</a><!-- m -->

I tried to contact the site admin but, a few weeks later, I still don't have a reply.

Thanks

RainI am not sure what query he is talking about either. I think there is a function in php that shows this but not positive.

but if all you want is something like what you posted, than just Download it

<!-- m --><a class="postlink" href="http://gamersimpact.com/niiiiice">http://gamersimpact.com/niiiiice</a><!-- m -->

I've been looking for something like that for EVER!!!!

Thanks man

Rainpretty easy as it was on that link you posted ;)oh :D

I got another question...

is there anyway to pass variables to include files?

Thanks

Rain

I gotta start looking harder :Dyup,

include("file.php?var1=something&var2=some");

or if you can make teh variabel befor eyou include it than just make sure you get in in the include.


$var = "something";
include("file.php");

then in the included file "file.php" you have this

echo $var;

should workI tried...

include ("/home/raindesigns/www/bfserver/layout/below_image.php?location=0");

and got...

Warning: main(/home/raindesigns/www/bfserver/layout/below_image.php?location=0) [function.main]: failed to create stream: No such file or directory in /home/www/raindesigns/bfserver/index.php on line 11

what I don't understand is the directories are different??

:-\

Any ideas?

Rainwell they are different because you are calling it from a different folder. if you are running index.php (which is in /home/www/raindesigns/bfserver/ and the include is 2 more folders down. it should have worked, maybe you can't. try to do it without the ?loction=0 on it and see if you get the same error.
 
Back
Top