Jump to content

Recommended Posts

Hi all

 

I'm not well versed in php, and was hoping someone would write a small routine fo rme?

 

I have a flat file named Known.txt, and it contains IP's and names, in this format (one per line):

 

192.168.1.1,Bob Anderson

192.168.100.1,Fred Davis

 

in my php file, I'd like for a routine to parse the txt file for the matching IP, and when found, return the name associated with it. So 192.168.100.1 would simply return "Fred Davis".

 

I'd really appreciate it!

 

Huge thanks in advance

SDC

Link to comment
https://forums.phpfreaks.com/topic/83294-req-small-routine/
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.