AccuWeather script & templates
Moderators: Developers, Moderators
-
- Posts: 11
- Joined: Fri Jan 28, 2005 9:41 pm
- Location: USA
- Contact:
frustrated Bad
I have tried everything with both the perl and php scripts and nothing at all. I got the perl working at command but would not graph. The php looks like this:
[root@sme7server scripts]# php ./accuweather.php Content-type: text/html
X-Powered-By: PHP/4.3.9
could not open XML input[root@sme7server scripts]# php accuweather.php
Content-type: text/html
X-Powered-By: PHP/4.3.9
All the templates import fine, Ive edited the url in line 2 like this:
$file = "http://forecastfox.accuweather.com/adcb ... orecastfox";
This returns the appropriate xml file for US Atlanta Georgia I believe.
I have set the cron for 1 minute and verified it to be doing so.
I am running a Centos 4 bases flavor of Linux with PHP 4.3.9
and cacti 8.6i
Seems like I've been trying to get these great looking graphs for years now, HELP please!
Thankyou in advance
[root@sme7server scripts]# php ./accuweather.php Content-type: text/html
X-Powered-By: PHP/4.3.9
could not open XML input[root@sme7server scripts]# php accuweather.php
Content-type: text/html
X-Powered-By: PHP/4.3.9
All the templates import fine, Ive edited the url in line 2 like this:
$file = "http://forecastfox.accuweather.com/adcb ... orecastfox";
This returns the appropriate xml file for US Atlanta Georgia I believe.
I have set the cron for 1 minute and verified it to be doing so.
I am running a Centos 4 bases flavor of Linux with PHP 4.3.9
and cacti 8.6i
Seems like I've been trying to get these great looking graphs for years now, HELP please!
Thankyou in advance
accuweather
Just customized a bit the php script and the data and graph templates, you only need to change the zip in the php file going to accuweather website and looking for your location. it works fine for me.
add the php file to your scripts folder and import the template, exported with cacti 0.8.6i
Cheers,
Steven Muntean
add the php file to your scripts folder and import the template, exported with cacti 0.8.6i
Cheers,
Steven Muntean
- Attachments
-
- accuweather_php.zip
- php script and host template
- (6.6 KiB) Downloaded 1797 times
Hello,
I get this running "php5 accuweather.php" :
Warning: fopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /root/accuweather.php on line 31
Warning: fopen(http://forecastfox.accuweather.com/adcb ... orecastfox): failed to open stream: Connection timed out in /root/accuweather.php on line 31
Any idea?
I get this running "php5 accuweather.php" :
Warning: fopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /root/accuweather.php on line 31
Warning: fopen(http://forecastfox.accuweather.com/adcb ... orecastfox): failed to open stream: Connection timed out in /root/accuweather.php on line 31
Any idea?
Parser broken by space
Hello,
I have noticed the XML parser is broken by retreiving a city name with a space in it. For instance if I pull down "Chiang Mai" it breaks with "could not open XML input" If I use Bankok (or any city name without a space in it) it works. I even went so far as to download the accuweather ASP file for chiang mai, edited it to remove the space (chiangmai instead of chiang mai) and loaded the file that way and it worked fine. What change needs to be made to the php file in order for it to handle names with spaces?
Thanks!
Danny
I have noticed the XML parser is broken by retreiving a city name with a space in it. For instance if I pull down "Chiang Mai" it breaks with "could not open XML input" If I use Bankok (or any city name without a space in it) it works. I even went so far as to download the accuweather ASP file for chiang mai, edited it to remove the space (chiangmai instead of chiang mai) and loaded the file that way and it worked fine. What change needs to be made to the php file in order for it to handle names with spaces?
Thanks!
Danny
Found the answer
Ok,
Looks like on the link you have to add a %20 in the place of the space. So for Chiang Mai in the URL you would put CHIANG%20MAI and it works. Hope this helps someone.
Danny
Looks like on the link you have to add a %20 in the place of the space. So for Chiang Mai in the URL you would put CHIANG%20MAI and it works. Hope this helps someone.
Danny
I was trying to get the .pl script to work and noticed that it was not properly graphing the Temp or Real Feel, I made some adjustments to the script and it works properly now. You can view the changes posted here
I have been messing with this script on and off for the last few months, but cannot get it working properly.
When running the php file from the command line I get the following error at random intervals and it appears to stop cacti grabbing anything useful.
XML error: not well-formed (invalid token) at line 1
This happens occassionally, other times from the command line it give all the numbers needed, but appears to fail when called by cacti..
Any ideas???
When running the php file from the command line I get the following error at random intervals and it appears to stop cacti grabbing anything useful.
XML error: not well-formed (invalid token) at line 1
This happens occassionally, other times from the command line it give all the numbers needed, but appears to fail when called by cacti..
Any ideas???
problem!
Hi all,
when i launch the php i have this error message:
[root@ciclope scripts]# php -q accuweather.php
PHP Notice: Undefined index: PRESSURE in /var/www/cacti/scripts/accuweather.php on line 45
PHP Notice: Undefined index: TEMPERATURE in /var/www/cacti/scripts/accuweather.php on line 46
PHP Notice: Undefined index: REALFEEL in /var/www/cacti/scripts/accuweather.php on line 47
PHP Notice: Undefined index: HUMIDITY in /var/www/cacti/scripts/accuweather.php on line 48
PHP Notice: Undefined index: WINDGUSTS in /var/www/cacti/scripts/accuweather.php on line 49
PHP Notice: Undefined index: WINDSPEED in /var/www/cacti/scripts/accuweather.php on line 50
PHP Notice: Undefined index: VISIBILITY in /var/www/cacti/scripts/accuweather.php on line 51
PHP Notice: Undefined index: UVINDEX in /var/www/cacti/scripts/accuweather.php on line 52
temperature: humidity: windgusts: windspeed: visibility:
please help me
sam
when i launch the php i have this error message:
[root@ciclope scripts]# php -q accuweather.php
PHP Notice: Undefined index: PRESSURE in /var/www/cacti/scripts/accuweather.php on line 45
PHP Notice: Undefined index: TEMPERATURE in /var/www/cacti/scripts/accuweather.php on line 46
PHP Notice: Undefined index: REALFEEL in /var/www/cacti/scripts/accuweather.php on line 47
PHP Notice: Undefined index: HUMIDITY in /var/www/cacti/scripts/accuweather.php on line 48
PHP Notice: Undefined index: WINDGUSTS in /var/www/cacti/scripts/accuweather.php on line 49
PHP Notice: Undefined index: WINDSPEED in /var/www/cacti/scripts/accuweather.php on line 50
PHP Notice: Undefined index: VISIBILITY in /var/www/cacti/scripts/accuweather.php on line 51
PHP Notice: Undefined index: UVINDEX in /var/www/cacti/scripts/accuweather.php on line 52
temperature: humidity: windgusts: windspeed: visibility:
please help me
sam
I've updated the original perl script to metric units and to work with the new accuweather setup, if someone is interested.
http://forums.cacti.net/viewtopic.php?p ... ht=#119746
http://forums.cacti.net/viewtopic.php?p ... ht=#119746
quick question...
regarding creating the device, what do i use as the host address? the full weather string from the script? or just the main section www.aws.com??
Ok.. I'm having this problem..
I'm wondering if I goofed up somewhere..
Code: Select all
scratchansniff scripts # php -q accuweather.php
Warning: fopen(): URL file-access is disabled in the server configuration in /var/www/localhost/htdocs/cacti/scripts/accuweather.php on line 31
Warning: fopen(http://forecastfox.accuweather.com/adcbin/forecastfox/weather_data.asp?location=EUR;ES;SP014;MAZARRON;&metric=1&partner=forecastfox): failed to open stream: no suitable wrapper could be found in /var/www/localhost/htdocs/cacti/scripts/accuweather.php on line 31
could not open XML input
Hello,
I just installed accuweather template and script (i had some problems while installing weatherbug). I set my country settings from accuweather.php and uploaded it. Everything was working like a charm. Graph started to show temperature and others for 20 min, and after that it stopped graphing.
So there is a line at my graph showing 24 celcius for 20 mins and than nothing came after that.
I thought something going wrong, so i removed graphs and add it back again. And now it only shows nan, nothing more.
When i run accuweather.php from ssh , it shows the values as , temperature : 24 , humidity : 150 bla bla.
But it is not showing on graph. And my other graphs (load graphs etc) are working perfect.
I just installed accuweather template and script (i had some problems while installing weatherbug). I set my country settings from accuweather.php and uploaded it. Everything was working like a charm. Graph started to show temperature and others for 20 min, and after that it stopped graphing.
So there is a line at my graph showing 24 celcius for 20 mins and than nothing came after that.
I thought something going wrong, so i removed graphs and add it back again. And now it only shows nan, nothing more.
When i run accuweather.php from ssh , it shows the values as , temperature : 24 , humidity : 150 bla bla.
But it is not showing on graph. And my other graphs (load graphs etc) are working perfect.
Who is online
Users browsing this forum: No registered users and 2 guests