I am a php novice.

I am trying to write a script that displays a copy of another webpage.
I keep running into the same problem: Relative paths!

Images and links are in the html as relative to the original url.
I would like to replace the relative path with an absolute one so that the page works.

<?php
$file = file_get_contents ("http://www.google.com");
echo $file;
?>

gives: http://www.drzo.com/cb/1.php

As you can see the google image is broken due to relative paths.

I have tried php includes and I have the same problem.

Help this is driving me CRAZY!!!

Thanks,

DB.