Use fopen() if you aren't real serious, use fsockopen() if you are. (when dealing with a large, and I mean large, EG 1000+ connection attempts, fopen() will hang occasionally)
If you use fsockopen, make sure to use blocking and set a time limit that's reasonable - usually 5-10 seconds.
$fp=fopen('http://remotesite.com');
$in=fread($fp, 1000000); // reads 1 MB
fclose($fp);
$in now contains your text. You can then use ereg_replace or str_replace to update your images...
$in=str_replace('bad.jpg', 'good.jpg', $in);
And then display the result:
echo $in;
It's also a good idea to cache the results locally if you are talking about repeated hits to the same site.
Bugger the guys who run this site to publish the article I wrote for them on this very subject!
-Ben