CJD wrote:
The ping prob. is working, but the results usually won't be passed back due to the Virtual Machines. So, you could try
<?php
system("ping yahoo.com > c:\ya.txt");
$ya = fopen("c:\ya.txt", "r");
while (!feof ($ya)) {
$buffer = fgets($ya, 1024);
print "$buffer";
}
fclose ($ya);
?>
A bit of a round-about way, but does what it should. If it hangs during processing (as mine used to) then try:
system("cmd /c ping yahoo.com > c:\ya.txt");
When I try this I get the following error:
Warning: Unable to fork [ping yahoo.com > c:\ya.txt] in D:\webpages\php\ping.php on line 2
I get the same error whenever I try to run any external program.