Use file(), it's the simplest:
$html = implode('', file("http://{$ip}/"));
Notes regarding the last post ... you cannot use filesize() on urls, nor can you be in fopen write mode. Now, if you don't need this as a variable then you can use the following (it'll directly output the html)
readfile("http://{$ip}/");