Copy output of PHP-generated file to another flat file

This is useful for you to create a static page of most visited page on your dynamic website (especially those being displayed on front page, sidebars and footers)

<?php 
$file = file_get_contents("http://yourserver.com/site/categories.php");
file_put_contents("categories.html", $file);
?>

Leave a Reply

Your email address will not be published. Required fields are marked *