I need a script written in PHP that will move and delete random lines of text from one text file and add/append them to a second text file. When the original text file is empty I would like an email to be sent notifying me that the file needs to be re-populated and which domain the script is located on. An example would be- "Notification: [login to view URL] located on [login to view URL] is now empty and needs to be re-populated".
In addition I would need the ability to configure the following variables-
-file name of original text file
-file name of text file to be populated
-random lines taken from original text file (I would like to choose a range such as 2-5 but 1-XXXX is fine)
-email address for notification
Thank you.