Hi all,
I am completely stumped on this, I've spent the last 45 minutes going searching docs on this site, on zend.com and php.net Maybe I'm looking for the wrong thing, but there has to be something that can do this.
What I'm doing is taking this text file full of IP Addresses and resolving all their hostnames. What I'd like to do is take this new list of hostnames and find everything that doesn't match 4 given expressions (-pc-,-mc-,-pt-,-mt-) and out put that onto the page for viewing. I've read all kinds of docs on how to match those expressions and output that, but nothing to parse that out!! Am I insane?
Here's what I have so far:
$newfile = file("ipfile.txt");
for($i = 0; $i < sizeof($newfile); $i++) {
print $newfile[$i] . "<br>";
}
I thought I should be able to do something like:
eregi (whatever statements here, $newfile[$i])
But according to all the docs I read it will just return those same 4 matches. Anyone have any suggestions? Or a place to point me??
Thanks for the time 🙂
./brm