inherit
93249
0
Aug 16, 2021 23:42:33 GMT -8
infestor1
.:.:.:.:.:.:.:.:.:.:.:.:.
3,056
November 2006
infestor1
|
Post by infestor1 on Aug 18, 2009 23:42:57 GMT -8
How can i use some sort of ping function with php? I want to check a server status. So i've seen file_get_contents() used and then see if you can find a specific file, but the server i want to check is a game server, so I cant really upload a specific file.
So is there like a ping() function?
<?php $ip = "127.0.0.1"; $ping = ping($ip); if(!$ping){ echo "server down"; } else { echo "server up"; } ?>
so how can i do this?
thanks, andrew
|
|
inherit
77753
0
Jul 18, 2024 12:23:50 GMT -8
Bob
2,623
April 2006
bobbyhensley
|
Post by Bob on Aug 19, 2009 0:41:52 GMT -8
How can i use some sort of ping function with php? I want to check a server status. So i've seen file_get_contents() used and then see if you can find a specific file, but the server i want to check is a game server, so I cant really upload a specific file. So is there like a ping() function? <?php $ip = "127.0.0.1"; $ping = ping($ip); if(!$ping){ echo "server down"; } else { echo "server up"; } ?>
so how can i do this? thanks, andrew You're only looking to ensure the server is active and communicating? PHP's fsockopen () should do the trick.
|
|
inherit
93249
0
Aug 16, 2021 23:42:33 GMT -8
infestor1
.:.:.:.:.:.:.:.:.:.:.:.:.
3,056
November 2006
infestor1
|
Post by infestor1 on Aug 19, 2009 1:44:50 GMT -8
How can i use some sort of ping function with php? I want to check a server status. So i've seen file_get_contents() used and then see if you can find a specific file, but the server i want to check is a game server, so I cant really upload a specific file. So is there like a ping() function? <?php $ip = "127.0.0.1"; $ping = ping($ip); if(!$ping){ echo "server down"; } else { echo "server up"; } ?>
so how can i do this? thanks, andrew You're only looking to ensure the server is active and communicating? PHP's fsockopen () should do the trick. Yes i remember that, thanks!
|
|
inherit
145612
0
Aug 27, 2009 9:47:00 GMT -8
deerhunter1660
1
August 2009
deerhunter1660
|
Post by deerhunter1660 on Aug 27, 2009 9:46:59 GMT -8
I cannot get my code to work. im not sure how but i have a form accepting two values and i need to use php to create a condidtional loop. whenever u put in the two values and submit it it says the page cannot be displayed because the address is incorrect. i cant figure it out any ideas? send to my email, not on this site frequently. deerhunter1660@yahoo.com
|
|
inherit
93249
0
Aug 16, 2021 23:42:33 GMT -8
infestor1
.:.:.:.:.:.:.:.:.:.:.:.:.
3,056
November 2006
infestor1
|
Post by infestor1 on Aug 27, 2009 15:32:28 GMT -8
First of all, don't hijack other threads.
Second of all, if you ask on this site, you should come back to see if your question has been answered. Because most of us aren't going to send you an email, we'd make a new post.
|
|