the "echo fopen()" was on purpose.
Now i know you are a complete newbie to PHP which you didn't tell us yet.
fopen() will fail on many webservers but alright here goes.
PHP Code:
if ($fp = fopen('http://www.google.com/', 'r'))
{
fpassthru($fp);
fclose($fp);
}
TIP: Learn about single quoting, it will free CPU usage.
NOTE: you probably can't use google search this way, and if that happens don't ask in here "it doesn't work". Just use header() and fix your code then.