PHP - pinging an address

Status
Not open for further replies.

nemesis2004

Baseband Member
Messages
25
I have looked long and hard for an effective way to ping a server in php. Unfortuantly, the only way i have found is to execute a program called ping and take the results from that. I believe this to have caused problems on my friend's computer as it is interpreted as being possible malicious code.

Can anyone suggest a way to archive this without executing an external program.
I am looking for either html, javascript or php.

Alan
 
jak, please read the question throughly before you post aan answer.

i don't see how MySQL would work. MySQL is a database instance.

i don't think you can ping someone through php. i think the only way is like you said, to use an external program.
 
Yeah, i have just read that there is no way to do this via php and yes, i was rather surprised to hear about mysql. This is how i do my databases for my site.

I guess i'll have to find another way to do it. If anyone discoveres a way to do it, please reply to this post.

Alan
 
Oh, and nice PC firefox

Thanks......that's what happens when you don't have a job....ill get a summer job...i plan on building myself one by the end of the year.....im gettin fed up with this computer.....i can't game on it whatsoever. I'll gladly take donations. ;)
 
Heh, yeah. If you live in the UK, then i found a nice retailer for pcs :

www.thepcmanuk.com

That's where i bought mine from a few months back. Great value for money if you don't choose to assemble one yourself
 
Execution Operator

Any reason why you're not using the execution operator and storing the information in a variable to use?

e.g.
$output = `ping 127.0.0.1`;
//this is for windows... it's a different command for unix or linux

I ask because I'm not clear on if you are doing this already and are having your issue, or are calling the executable in a command windows itself.
If you are using the executaion operator... just disregard my stupidity.
 
Status
Not open for further replies.
Back
Top Bottom