One way to do it:
Add data to file, one host per line. Then read that data and extract
the contents to array, one line per element.
You can use eg. explode function for that, like $rows = explode("\n",
$dataFromFile);
Then iterate that in foreach loop and call the function for every row
eg.
foreach($rows as $id=>$host)
{
do_ping($host, $fping, $p_result) ;
}
--
Henri Hovi
http://www.patidure.com