PHP - pinging an address - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Programming
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 04-09-2004, 05:49 PM   #1 (permalink)
Newb Techie
 
Join Date: Apr 2004
Posts: 25
Default PHP - pinging an address

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
__________________

__________________
nemesis2004 is offline  
Old 04-09-2004, 08:46 PM   #2 (permalink)
Ultra Techie
 
FireFox's Avatar
 
Join Date: Apr 2004
Posts: 608
Default

The correct way to do it, would to be to use MySQL.
__________________

__________________
FireFox is offline  
Old 04-10-2004, 06:53 AM   #3 (permalink)
Newb Techie
 
Join Date: Apr 2004
Posts: 25
Default

Can anyone assist me in doing that via mysql?

Oh, and nice PC firefox
__________________
nemesis2004 is offline  
Old 04-10-2004, 11:11 AM   #4 (permalink)
Master Techie
 
Join Date: Mar 2004
Posts: 2,007
Default

The way I ping an address is goto run, ipconfig, then ping the address I want
__________________
jaksback is offline  
Old 04-10-2004, 12:00 PM   #5 (permalink)
Banned
 
Join Date: Jan 2004
Posts: 471
Default

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.
__________________
subdivizion is offline  
Old 04-10-2004, 03:55 PM   #6 (permalink)
Newb Techie
 
Join Date: Apr 2004
Posts: 25
Default

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
__________________
nemesis2004 is offline  
Old 04-11-2004, 08:30 PM   #7 (permalink)
Ultra Techie
 
FireFox's Avatar
 
Join Date: Apr 2004
Posts: 608
Default

Quote:
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.
__________________
FireFox is offline  
Old 04-12-2004, 06:48 AM   #8 (permalink)
Newb Techie
 
Join Date: Apr 2004
Posts: 25
Default

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
__________________
nemesis2004 is offline  
Old 04-12-2004, 10:54 AM   #9 (permalink)
Ultra Techie
 
FireFox's Avatar
 
Join Date: Apr 2004
Posts: 608
Default

Nahh.....I build my own..it's the best way to do it
__________________
FireFox is offline  
Old 04-16-2004, 05:35 PM   #10 (permalink)
Newb Techie
 
Join Date: Apr 2004
Posts: 23
Talking 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.
__________________

__________________
TrowaBarton is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 10:23 AM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2019, vBulletin Solutions, Inc.