This code will grab the source code from whatever page you want and display it on YOUR OWN site. In this case, we’re getting the source code from Yahoo!’s homepage. You can also replace the ‘echo $source’ part to save the contents into folder, etc. if you like.
$source = file_get_contents('http://yahoo.com');
//let's trim some of the code before we use it
//strip everything BEFORE the "opening" tag
$source = strstr($source, 'OPENING TAG');
//strip everything AFTER this. In this case, the "closing" tag
$source = str_replace(strstr($source, 'CLOSING TAG HERE'),'',$source);