fh = fopen('http://www.example.com/file.txt', 'r'); // file handle (r: read) $contents = stream_get_contents($fh); // hasil