11.13 Mirroring a Web Page


You want to mirror a Web page on your server.

Technique

Simply use the readfile() function:

 <?php     readfile('http://www.designmultimedia.com/'); ?> 

Comments

The readfile() function takes a URL and writes the output to the browser. So, every time your page is requested , it simply outputs the page that it fetches from another server.



PHP Developer's Cookbook
PHP Developers Cookbook (2nd Edition)
ISBN: 0672323257
EAN: 2147483647
Year: 2000
Pages: 351

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net