Forum Moderators: coopster

Message Too Old, No Replies

Send server file via PHP

Use a PHP page to send a file from the server

         

skeddy

7:19 pm on Jan 8, 2005 (gmt 0)

10+ Year Member



I've been looking around on the forum and also on Google, but haven't been able to come across an answer to this problem.

I have a file that is created each day on my server, a back up of the database, and would like to try and set up a CRON job that would e-mail the file to me once it's been backed up.

At the moment, the CRON job reads a PHP file, does the Mysql backup and spits out the file to the server.

I'd like to add to the bottom of this, a function to collect the file from the server, and then e-mail it to an address.

Tutorials that I have seen so far only deal with a file that has been uploaded via a form. In this case, the file would already be sitting on the server.

Any pointers?

storevalley

10:01 pm on Jan 8, 2005 (gmt 0)

10+ Year Member



Welcome to WebmasterWorld skeddy :)

Try Googling for mime_mail.class ... you should find some useful stuff about emailing attachments there.