Login   Register  
PHP Classes
elePHPant
Icontem

doesn't work

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      PHP Weather  >  All threads  >  doesn't work  >  (Un) Subscribe thread alerts  
Subject:doesn't work
Summary:only shows "cannot access API"
Messages:4
Author:Olaf Kliemt
Date:2014-04-06 08:35:36
Update:2014-04-10 09:58:42
 

  1. doesn't work   Reply   Report abuse  
Picture of Olaf Kliemt
Olaf Kliemt
2014-04-06 08:35:36
only shows "cannot access API"

  2. Re: doesn't work   Reply   Report abuse  
Picture of Samy Massoud
Samy Massoud
2014-04-06 09:22:40 - In reply to message 1 from Olaf Kliemt
Dear Olaf

Please check this online demo

http://www.deploy2cloud.com/demo/weather/

This is based on this class .
So please make sure you have internet connection,
And for more info this class use (file_get_contents) method to Fetch data from weather API website.

Also it will be helpful if you sent me your code to call this class (Include city name, ..)

Thanks

  3. Re: doesn't work   Reply   Report abuse  
Picture of Ray Beriau
Ray Beriau
2014-04-10 09:49:18 - In reply to message 2 from Samy Massoud
Olaf, as a test, try entering the name of a large city near you.

As I was testing my (modified) 'Weather Widget Class' script for the proper display of very long city names, I received the 'Can't Access Weather API' - when I entered the same city name on the OpenWeatherMap site, I received the message that it could not find the city - although the 'Weather Widget Class' script was able to access the OpenWeatherMap API, it received back the reply "Error: Not found city" - unfortunately, Samy has not yet put in the code to display such error.

Ray.

  4. Re: doesn't work   Reply   Report abuse  
Picture of Ray Beriau
Ray Beriau
2014-04-10 09:58:42 - In reply to message 3 from Ray Beriau
Oops...

Just checked the 'Weather Widget Class' script again and it does display the appropriate 'Error: Not found city' message (not truly in good english) when a city name is not found in the OpenWeatherMap city list database.

Ray.