lildog Posted July 1, 2008 Share Posted July 1, 2008 It is one of those days! Just havin' a hard time all day long. Can someone tell me why this doesn't work? I am getting an error that says the file doesn't exist, but point your browser there and it is there. $xml_file = 'http://dor.wa.gov/AddressRates.aspx?output=xml&addr=6500_Linderson_way&city=&zip=98501'; $fp = fopen($xml_file, "r") or die("Could not open file"); $data = fread($fp, filesize($xml_file)) or die("Could not read file"); fclose($fp); Thanks lildog Link to comment Share on other sites More sharing options...
lildog Posted July 1, 2008 Author Share Posted July 1, 2008 I am getting: [01-Jul-2008 22:23:29] PHP Warning: file_get_contents(http://dor.wa.gov/AddressRates.aspx?output=xml&addr=6500 Linderson way&city=&zip=98501): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request using file_get_contents Link to comment Share on other sites More sharing options...
germ Posted July 2, 2008 Share Posted July 2, 2008 <?php $lines = file('http://dor.wa.gov/AddressRates.aspx?output=xml&addr=6500_Linderson_way&city=&zip=98501'); foreach ($lines as $line_num => $line) { echo $line; } ?> If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.