Two Php Scripts

Two Php Scripts
Hi,

I would like two php scripts to be used for cron scheduling.

First script:

I’d like a PHP script that checks a directory for a file (bed’s.txt) and compares it to bed.txt.

If bed’s.txt is newer than bed.txt, I want bed’s.txt to be copied over to bed.txt and then I would like bed’s.txt to be deleted. Otherwise, I want bed’s.txt to be deleted.

Leave a placeholder where I can fill in the directory name, otherwise assume it checks the current directory.

After the script completes I want an email sent to me. Just put placeholders for the from, to, subject headers.

Second script:

I’d like a PHP script that checks a directory for a file (testing.gz). If the file exists, I want to extract it and compare it to testing.xml. Note, it will extract to testing.xml so when it extracts, it should be renamed to something else.

If the renamed uncompressed file is newer than testing.xml, I want the newer one to replace the current file. I want to keep the name of the testing.xml. Otherwise, delete the uncompressed file and compressed file.

Leave a placeholder where I can fill in the directory name, otherwise assume it checks the current directory.

After the script completes I want an email sent to me. Just put placeholders for the from, to, subject headers.

Note, that I want to use these for cron scripts, but, my hosting company doesn’t allow shell scripts so don’t use any unix shell scripting. The names I used are fictional. Please test on your own system.

I would like one day to test. Not b/c it will take that long but because I may not have time to test it immediately. I will pay after I have tested it and have seen that it works. I’ll make sure I do it within a day or two.

Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *