weather.com errors

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Greg_BigPhpAmator
Forum Newbie
Posts: 15
Joined: Thu Feb 12, 2009 1:56 pm

weather.com errors

Post by Greg_BigPhpAmator »

Hello. I am not sure if thi is right place for me to post.
I am trying to get weather from weather.com using their rss.
I did all as they wrote in readme.txt. But it doest work.
I get these errors:
Warning: fopen(): URL file-access is disabled in the server configuration in /home/content/m/i/a/miasik/html/pogoda/2/weather.php on line 56

Warning: fopen(http://xoap.weather.com/weather/local/1 ... 22f21ea90a): failed to open stream: no suitable wrapper could be found in /home/content/m/i/a/miasik/html/pogoda/2/weather.php on line 56

Warning: feof(): supplied argument is not a valid stream resource in /home/content/m/i/a/miasik/html/pogoda/2/weather.php on line 57

Warning: fread(): supplied argument is not a valid stream resource in /home/content/m/i/a/miasik/html/pogoda/2/weather.php on line 58
Script supose to read xml and write conditions in weather.txt file.

It doesnt work either on server or my computer as a server.
Please help how to read that xml and get only few conditions or maybe somebody has any script which gets conditions from yahoo xml or weather.com xml
Thx.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: weather.com errors

Post by pickle »

fopen() & other file opening/reading functions need to have URL file access enabled in order for you to use them with URLs.

Make your life easy & use SimplePie
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Greg_BigPhpAmator
Forum Newbie
Posts: 15
Joined: Thu Feb 12, 2009 1:56 pm

Re: weather.com errors

Post by Greg_BigPhpAmator »

SimplePie - how it works? Just installed it. Demo works. Checked compatibility.-OK. When I click on Create.php nothing hapes. How to start it?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: weather.com errors

Post by pickle »

Read the documentation - it knows a lot more than I.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply