PHP script to read an attached file and place in an assigned folder.
I need a PHP script to read my email account and get the attached file and place it into a folder based on the database information. [I must be able to change the email account information, Ex: host, username and pw]. For the database, I need a web page to be able to add, edit or delete the customer’s phone, the folder and their email address.
Here are the fields for the database:
See A in [url removed, login to view] file:
The customer calls and leaves the message and hangs-up. [Details on the length of the message will be given to the customer.]
The Voice mailing company emails our support group this format: [Must be able to change our support email address]
Here is the email format from the Voice message company.
See B in [url removed, login to view] file:
The script reads the first email. Option to delete or don’t delete the emails after reading them.
The script checks the database to see if the customer Phone number is listed. In this case it is. And the customer folder is 2354AD908. We make the folder 2354AD908 on our server. [If the customer number is in the database and it has folder 2354AD908 in the database along with their email address, but we forgot to make the folder 2354AD908 on our server, the script should make the folder 2354AD908.]
The script places the [url removed, login to view] file in folder 2354AD908 and rename it 2354AD908.wav. Option to have other types of file and rename them. Example: Receive [url removed, login to view] and rename it to [url removed, login to view], plus other audio files like gsm. [Note: The new [url removed, login to view] will overwrite the previous [url removed, login to view] file each time.] in this case, the audio file location will be at:
See C in [url removed, login to view] file:
The script emails the customer, using the email address in the database one of these messages based on the size of the wav [or other files] it received. Email the customer a message, “Your voice message has been received successfully.” [If the attached file is below the set size.] Also, email the URL location of the file to our support email address. Need this option: Set 1 to email us [support email] or 0 not to email us.
If the message is larger than the set file size, email the customer, “ Your message excess the allowable size, please call back and shorten message”. [Must be able to set the allowable file size]. [Don’t email us [Support email address] in this case.] Note: I must be about to edit both messages to the customer.
If the script read a phone number that is not in the database file, them it should send an email to our email support email address a message like “Caller from [This is the caller phone number] used the system and is not a member.” [Must be able to edit this sentence.]
Read the next email, and so on.
Testing the script:
Let us know what email you want the test emails to go to. We will arrange for the Voice mail company to send the audio file to that email address.
Note: You email us the email address you will be testing the script at [this is for the Voice Mail company to send the emails to you] and we will email you the phone number to Voice Mailing Company to get access to call and test the script. We will send you our phone number and email address to be placed in the database file. For testing you can create any number for the customer folder to load the file too.
Email us the size of the file you set for the file. Once the script is working, email us the URL for testing the script. We will have the Voice mail company to set the file for wav file. [WAV is what it is currently set too.] We will call and leave a message that will be below the file size and next over the file size. Next the Voice Mail Company will have the file set to mp3, them we will call and leave a message that will be below the file size and next over the file size. We should get the appropriate email messages as stated above. Also, we will call from a number not in the database to get the message like “Caller from their phone number used the system and is not a member.” We also will call and leave a message for both setting for the wav and mp3 over the set size and we should get the appropriate message.
Upon the successful testing of the script, the agreed price will be paid in full. Contact me if more clarification is needed.
Addition: Must provide instruction on installing the script and/or install the script on our server for testing. We will provide info to log on our server for installation. Thanks. KJ
Note: If your script will require a special installation of some software on the hosting service I will use, please send Post a PM to me. I will need to check to see can the hosting install it or if it is already installed. One of the two companies I will use is Powweb or DreamHost. If you like, you can check those two companies to see if the required software is already installed on those hosting companies system.