Hello I have been struggling with this a bit so if anyone can offer any suggestions that would be great.
I am writing a php page that need to do the following:
1. Look in a certain directory for a new file that gets created every morning.
2. Grab the date and a number from a certain section of the file.
3. E-mail various people based on that number.
4. FTP that date/number to an appendable file on another server.
I can handle 1,3 and 4 I am stuck on the second part and my brain is not working at the moment.
Here is what I am looking at:
I have a text file that a new one gets created everyday and is named file01062005.txt inside that file there is a section that is in this format:
COUNT_BEGIN
01012005 1 3 4 1234
01022005 1 44 44 1234
01032005 1 123 44 1234
01042005 1 55 44 1234
COUNT_END
COUNT_BEGIN and COUNT_END will always be constant the information in between those tags will change.
I need to grab information from whatever the last line is such as in this case I need to grab
01042005
55
Then I would just take those Values and set my two variable AW_date and AW_count and then I can do my conditional work.
Any ideas how to do this in PHP or where to start.
Thanks-
I am writing a php page that need to do the following:
1. Look in a certain directory for a new file that gets created every morning.
2. Grab the date and a number from a certain section of the file.
3. E-mail various people based on that number.
4. FTP that date/number to an appendable file on another server.
I can handle 1,3 and 4 I am stuck on the second part and my brain is not working at the moment.
Here is what I am looking at:
I have a text file that a new one gets created everyday and is named file01062005.txt inside that file there is a section that is in this format:
COUNT_BEGIN
01012005 1 3 4 1234
01022005 1 44 44 1234
01032005 1 123 44 1234
01042005 1 55 44 1234
COUNT_END
COUNT_BEGIN and COUNT_END will always be constant the information in between those tags will change.
I need to grab information from whatever the last line is such as in this case I need to grab
01042005
55
Then I would just take those Values and set my two variable AW_date and AW_count and then I can do my conditional work.
Any ideas how to do this in PHP or where to start.
Thanks-