You are here: Re: Using PHP to Database Tables via Email « PHP SQL « IT news, forums, messages
Re: Using PHP to Database Tables via Email

Posted by Tom on 12/20/07 18:32

On Sat, 8 Dec 2007 07:42:07 -0800 (PST), aj wrote...
>
>Hello all.
>
>I use 1and1 as my webhost.
>
>Using their configuration, the web server and mysql server are 2
>different machines.
>
>I have a web application that uses 2 database tables. I am looking
>for a convenient way to get backup's of the database tables at a click
>of a button on an admin section of my website. So far, I have had no
>luck.
>
>My latest attempt involved the following steps:
>
>1) Running a system command to put the database tables in a file:
>system("mysqldump -h $dbhost -u $dbuser -p $dbpass $dbname >
>$backupfile");
>
>2) Composing an email using php's Mail library and adding the
>aforementioned backup file as an attachment.
>
>Anyone have any experience with this? Offer any insight?
>
>Thanks,
>AJ


If you are running your system on a Unix/Linux platform you can use Cron to
schedule automated backups, like mysqldump, and create other scripts to email
yourself files. Since those normally happen outside the Web, you may be better
off creating a non-PHP based script to automate the email.

Tom
--
Newsguy Free Trial Accounts increased to 20 GB
http://newsguy.com/overview.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация