if you are generating your own pages you wish to store into a string look into the output buffering functions
ob_start();
echo "content";
$contents = ob_get_contents();
ob_end_clean();
echo $contents;
if you are looking at loading some other page look into file() and readfile() or even possibly the curl_ functions