ldsmike88 Posted March 7, 2007 Share Posted March 7, 2007 I have a really old script I have been using for weather from weather.com. It get's the weather and shows it on my homepage. A few weeks ago it randomly stopped working. I renewed my account with weather.com and I still can't get it to work. It seems to be getting stuck on the line of code below. If anyone knows what the problem with this is, or if you know of a good sample script for a weather.com xml feed I would greatly appreciate it! Thanks! // Get XML Query Results from Weather.com $fp = fopen($url,"r"); while(!feof($fp)){ $xml .= fgets($fp, 4096); } Link to comment https://forums.phpfreaks.com/topic/41570-solved-weathercom-xml-data-feed/ Share on other sites More sharing options...
ldsmike88 Posted March 7, 2007 Author Share Posted March 7, 2007 Well I found out that fopen was turned of in my php.ini file. After I turned that on it still wont work. Is this not the way to deal with XML Link to comment https://forums.phpfreaks.com/topic/41570-solved-weathercom-xml-data-feed/#findComment-201675 Share on other sites More sharing options...
ldsmike88 Posted March 7, 2007 Author Share Posted March 7, 2007 Well I thought I turned on fopen. In the php.ini file I simply edited the file and uploaded it to the server. I changed it to this: ;;;;;;;;;;;;;;;;;; ; Fopen wrappers ; ;;;;;;;;;;;;;;;;;; ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. allow_url_fopen = On ; Whether to allow include/require to open URLs (like http:// or ftp://) as files. allow_url_include = On But when I run phpinfo(); it says allow_url_fopen Off allow_url_include Off Why doesn't it turn it on? Thanks! Michael Link to comment https://forums.phpfreaks.com/topic/41570-solved-weathercom-xml-data-feed/#findComment-201683 Share on other sites More sharing options...
redarrow Posted March 7, 2007 Share Posted March 7, 2007 http://uk2.php.net/manual/en/ini.php#ini.list Link to comment https://forums.phpfreaks.com/topic/41570-solved-weathercom-xml-data-feed/#findComment-201691 Share on other sites More sharing options...
obsidian Posted March 7, 2007 Share Posted March 7, 2007 http://uk2.php.net/manual/en/ini.php#ini.list redarrow is right: try setting your values to '1' instead of 'On', and you may have better luck Link to comment https://forums.phpfreaks.com/topic/41570-solved-weathercom-xml-data-feed/#findComment-201696 Share on other sites More sharing options...
ldsmike88 Posted March 7, 2007 Author Share Posted March 7, 2007 Well it turns out I had to restart my VPS on my server before the changes would take effect. Thanks anyway though guys! Link to comment https://forums.phpfreaks.com/topic/41570-solved-weathercom-xml-data-feed/#findComment-201708 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.