Im trying to figure out fsockopen to grab an rdf file. Here is the code -> ----------------------------- <?php
$str = 'http://slashcode.com/slashcode.rss'; $url = parse_url($str); $path = ($url['path']) ? $url['path'] : '/'; $port = ($url['port']) ? $url['port'] : '80'; if ($fp = fsockopen($url['host'], $port, &$errno, &$errstr, 5)) { fputs ($fp,"GET / HTTP/1.0\r\nHost:" . $url[host] . $url[path] . "\r\n\r\n"); while (!feof($fp)) { echo fgets($fp, 1024); } fclose ($fp); } else { echo "Problem: $errno"; } ?> ------------------------------------- Its coming back with a HTTP/1.1 400 Bad Request Any help would be greatly appreciated. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php