i'm trying to capture output from a remote url(random.yahoo.com/fast/ryl) and use it on my site. however, the remote url output always leads with a Status 301 code, then outputs the data i want. as a result, the fopen() function thinks that the connection to the remote url fails, and goes no further. below is the code snippet i'm using to try and capture the stream, to no avail... function random_website() { $site = "http://random.yahoo.com/fast/ryl"; $open = fopen($site, "r"); $search = fread($open, 50000); fclose($open); $search = ereg("Location: (.*)", $search, $content); return $content[1]; } ultimately, what i want is the data given after the 301 code, which is a random url generated when you load the remote url. any thoughts or suggestions are welcome. thanks green -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php