"Alantodd" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have 2 text files
>
>
>
> One has arp list
>
>
>
> IP Address               MAC Address          Type
>
> ----------------             ------------------             ----------
>
> 165.166.182.204      00:0a:04:98:b5:d3     dynamic
>
>
>
>
>
> One file has a mac list
>
>
>
> Modem MAC Address          IP Address      CPE IP Address         CPE MAC
> Address   CPE Source
>
> -----------------                           ---------------
> ---------------- -             ----------------             -----------
>
> 00:00:39:46:88:57                 10.21.2.236     165.166.182.204
> 00:0a:04:98:b5:d3            Learned
>
>
>
>
>
>
>
> Just an example - there are about 5000 entries in each file (more in the
mac
> list)
>
>
>
> What I am trying to do is match the mac address from the arp file to a cpe
> Mac address in the Mac file and return modem Mac and ip address from Mac
> list.
>
>
>
> I can open the arp and set what I want to an array. But matching up is
where
> I hit a wall..
>
>
>
> Thanks for any help or at least a point in some direction
>
>
>
> Alan

Hi Alan,

I guess you'd have to read the second file into an array as well (line by
line) and then *for each* entry from the arp list loop through all entries
of the mac list and compare the values.

Have you considered putting the data into two MySQL tables? This would make
dealing with it much more comfortable.

Regards, Torsten Roehr

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to