note 49809 deleted from function.file-get-contents by nlopess

From: Date: Thu, 10 Feb 2005 10:48:59 +0000
Subject: note 49809 deleted from function.file-get-contents by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-84780@lists.php.net to get a copy of this message
Note Submitter: hajj0 ---- This is a simple function to save a website's content into a file on your server. You are able to backup your files with this function. (note that only the HTML-Output will be copied, not the database contents you may use to generate the contents of your website) <?php //file where the backup will be saved to $file = fopen('ftp://user:password@ftp.host.com/dir/targetfile', 'w'); // save the contents of the website to the file defined in "$file" fwrite($file, file_get_contents('http://www.domainx.org/index.html')); //close fclose($file); ?>

« previous php.notes (#84780) next »