PDA

View Full Version : PHP - Saving files from a link in an email ?



brigzy
09-16-2005, 12:53 AM
Hi, I'm looking for the answer to the following: Need to make script that will save files from links in emails to the server that the website is hosted on. The emails come from Mobile Phones. When the email arrives, it has a link saying, please click here to watch the video or photo message. The actual video or photo files are not sent as attachments, they stay on the Telephone Networks servers. This is why you only get a link to the files and not an attachment. The other network concerned, does send the vid and photo files as attachments. We also need to save these. So our website, that allows members to send video and photo messages from their Mobile Phones to our website, via email, must be able to "Save" the files (from the link) and play them in the browser too. So members send the email from their Mobile Phone, the database recognizes them and saves their video file. Then when another member visits the site, they can view/play the video file on the website. The files are easy to save manually, by right clicking the link, selecting "save target as" and save to hrd drive. We just need a script to do that ? I have video and photo messages in email form from both Networks that I can send to anyone who wants to see them. tim@unrealdesign.co.nz

The key is, we MUST save the files from all these mobile phone emails. If we don't, the Phone Network deletes the files of their servers after 2 months. If we are playing our videos on the website using the files being hosted on their servers, the videos will stop working on my site when they delete them.
_______________________________________________________________________________________________________________
More details: Programmer notes. (PHP)

I need to save files from that video/photo message link, when u click on the video message link, you will get to see that file vid / audio in your browser, need your script target to save that file in my server folder and in a remote server folder and in the same time one record should insert in the table(Example :vpxt_data)

v_pxt = meaning Video Message
vpxt_data table structure like:
Sender_Mobile_No int (12) File_Name varchar (100)
So vpxt sender mobile no should store in Sender_Mobile_No and vpxt file name should store at File_Name field.
_____________________________________________________________________

If you have any experience or know the solution to this, please contact me at tim@unrealdesign.co.nz
"Script saving files from a link in an email message"

Thanks in advance. [:)]
Tim.

Twey
09-16-2005, 11:23 AM
The files are easy to save manually, by right clicking the link, selecting "save target as" and save to hrd drive. We just need a script to do that ?
You can't write to a user's hard drive. Try using a signed Java applet if you really must.