|
Posted by Fred Atkinson on 07/11/05 18:24
I may have just figured out the means to a solution. Can
anyone suggest a way to do it?
Is there a function that would start at the beginning of a
file, check each line until it found the last IP address in the file
and return that last IP address it encounters that is written into
that file?
There is a log file for that service program (DynDNS by
SiteDevelopers) that records the current public IP address each time
it changes. If I could return that IP address with a PHP function,
that would do it. This IP address would be the gateway.
There is a copy of the first few lines of the log file below
(I changed the IP addresses and the subdomain names for security
purposes). If this were the entire file, the function should return
35.99.26.52.
Any ideas on how this could be done?
Regards,
Fred
11/11/2004 6:44:51 AM - Dynamic DNS Client's service has started.
11/11/2004 6:44:52 AM - Site index number: 0
11/11/2004 6:44:53 AM - IP Change Detected. New IP: 35.99.26.25
11/11/2004 6:48:12 AM - Dynamic DNS Client's service has started.
11/11/2004 6:48:15 AM - Site index number: 0
11/11/2004 6:48:19 AM - IP Change Detected. New IP: 35.99.26.74
11/11/2004 6:53:46 AM - Manual request to go offline.
11/11/2004 6:53:53 AM - www.slamdunk.com updated successfully to
127.0.0.1
11/11/2004 6:53:54 AM - www.dunkslam.com updated successfully to
127.0.0.1
11/11/2004 6:53:57 AM - Manual request to go online.
11/11/2004 6:53:57 AM - Site index number: 1
11/11/2004 6:53:57 AM - IP Change Detected. New IP: 35.99.26.52
11/11/2004 6:54:08 AM - Manual request to go offline.
11/11/2004 6:54:09 AM - Manual request to go online.
Navigation:
[Reply to this message]
|