Skip to content

scomx/php-formatters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-formatters

wxloader.php unifies the function of acpwx.php and atmocsv.php and replaces both scripts.

The script fetches current and cumulative data from a data file that is generated by atmolog.php, hence you must begin with installing atmolog.php and verify that it works correctly.

The fetched data is formatted and displayed as CSV, JSON or XML. This is equivalent to opening a file containing data formatted in one of these three formats.

The main purpose of this script is to provide a performance optimized data channel to various weather dashboards such as Weather34 Home Weather Station and Meteotemplate.

Simple installation

Upload wxloader.php to the same folder where you have installed the atmolog.php script.

Latest weather data can now be accessed via the web browser by providing your Weather Underground station ID and a formatting parameter: 'c' for CSV, 'j' for JSON or 'x' for XML. For example:

CSV: http://www.mysite.com/wxloader.php?id=iplace17&fmt=c
JSON: http://www.mysite.com/wxloader.php?id=iplace17&fmt=j
XML: http://www.mysite.com/wxloader.php?id=iplace17&fmt=x

Data is refreshed every time ATMOCOM uploads new data to atmolog.php.

Advanced installation:

TBA

Special Note

CSV fields and their order are specified at the end of the wxloader.php file in comments.

About

Data fetch and formatting scripts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages