Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
using_weatherduino_pro2_upload_data_website_database_sql [2018/08/27 21:40]
werk_ag [Using WeatherDuino Pro2 PLUS to upload data to a website database with SQL]
using_weatherduino_pro2_upload_data_website_database_sql [2018/08/27 21:41] (current)
werk_ag old revision restored (2018/05/20 22:33)
Line 1: Line 1:
-==== Testing PHP scripts ​to ensure it writes ​====+====== Using WeatherDuino Pro2 PLUS to upload AQM data to a website database with SQL ====== 
 +//By [[http://​palmyweather.co.nz|PalmyWeather]]//​
  
-A web browser can be used to test the PHP scripts to ensure they write.\\ 
-As an example, this URL if entered into the web browser, should write data into the Air Quality database if it has been set up correctly (change the URL to find the "​AirQuality_LogToSQL.php"​ file):\\ 
-www.YOURSERVER.XXX/​AirQuality_LogToSQL.php?​privatekey=YOURKEY&​PM25=99&​PM100=98.7&​AQI=97&​CO2=96\\ 
-Once the web browser loads the page, nothing will be displayed. But if the database is viewed, the data listed in the URL should have been entered. 
  
- +==== Using WeatherDuino Pro2 PLUS to upload ​AQM data to a website database with SQL ====
-==== Using WeatherDuino Pro2 PLUS to upload data to a website database with SQL ====+
  
 **(Available in Receiver Software Release v6.x onwards)** **(Available in Receiver Software Release v6.x onwards)**
Line 69: Line 65:
   * Open “AirQuality_LogToSQL.php” for configuring this file.   * Open “AirQuality_LogToSQL.php” for configuring this file.
     * Locate and update the “include” line in this file. This is used to point the path to read the credentials set in the “db_rw_details.php”. It is best if these two file are not located in the same folder for security reasons.\\ An example of this is: include ('/​home/​weather/​data/​scripts/​db_rw_details.php'​);​     * Locate and update the “include” line in this file. This is used to point the path to read the credentials set in the “db_rw_details.php”. It is best if these two file are not located in the same folder for security reasons.\\ An example of this is: include ('/​home/​weather/​data/​scripts/​db_rw_details.php'​);​
-    * Locate the timezone setting and update this to your location. The following website can help choose the best timezone name to use for your area: http://​php.net/​manual/​en/​timezones.php .\\  Example of this is: date_default_timezone_set('​Europe/​Lisbon'​);​+    * Locate the timezone setting and update this to your location. The following website can help choose the best timezone name to use for your area: http://​php.net/​manual/​en/​timezones.php .\\  Example of this is:​date_default_timezone_set('​Europe/​Lisbon'​);​
     * Choose the path of where the text log should be stored. This is a one line text file which get updated each time the data is uploaded to the website. For example:​$logfile = '​./​logs/​AirQuality_Log.txt';​     * Choose the path of where the text log should be stored. This is a one line text file which get updated each time the data is uploaded to the website. For example:​$logfile = '​./​logs/​AirQuality_Log.txt';​
  
Print/export
QR Code
QR Code using_weatherduino_pro2_upload_data_website_database_sql (generated for current page)