PHP/AJAX Website Template Set - Virtual Weather Station Setup
There are three needed setups required in VWS for the proper operation of your template set. Please follow the setup instructions in the sections below to have VWS upload your VWStags.php file, your AJAX update data files (wflash.txt, wflash2.txt) and your graph files for wxgraphs.php page. You may optionally generate a new VWStags.htx file from VWS to contain data for METAR stations you have selected.
The setup instructions for VWStags.php and the graphics files assume you are using VWS's built-in FTP to upload the files. If you are using a third-party FTP to upload the files instead, then omit the setup instructions to set an FTP schedule for the VWStags.php and graphics files and continue to have VWS just create, but not upload the files for you.
Setup to upload VWStags.php
Select either the VWStags-comments.htx file (larger, but with comments) or the VWStags.htx (smaller, without comments) as the template file source from the distribution WXtags-template-files directory.
Then place the chosen file in your c:\vws\templates directory
Use the VWS, Internet, HTML Settings panel
and place a new entry to process as:
Set Update Time to 5 minutes.
Press Update, then Close to exit the dialog.
Use the VWS, Internet, FTP Send(upload) File panel
Set the From Location (local drive) to : c:\vws\root\VWStags.php
Set the To Location(server) to:
so that the processed file VWStags.php is uploaded to your website.
Press the Calendar button to the far right and on that dialog
Set a schedule for uploading the VWStags.php file to 5 minutes.
Press Close to enable the schedule.
Press Close on the FTP Send dialog to save the setup.
Then you should be able to see the uploaded tags on your website as:
http://www.yourwebsite.com/VWStags.php?sce=view (see the raw source after processing by VWS)
http://www.yourwebsite.com/VWStags.php?sce=dump (see the contents of the resulting $WX array with VWS tag names and data values
Note: if you experience issues with your website showing PHP error messages like "unexpected end in VWStags.php", it may be due to a slow FTP connection such that your browser is accessing the website as VWS is uploading the VWStags.php, and has not yet finished.
To remedy this issue, you can upload your tags file to VWStags-new.php, make sure that VWStags.php is writable by PHP, and the V1.04 of top.php will automatically copy VWStags-new.php to VWStags.php to ensure you have a complete/fresh copy when your website is accessed.
Enable WeatherFlash data uploads for AJAX updates
Note: Skip this section if you already have WeatherFlash installed
Inside the VWS-plugin.zip distribution file under the WXtags-template-files directory, you will find a wflash directory.
Upload the entire wflash directory structure to /wflash on your weather website.
When successful, you should have on your website (at the document root) these directories:
and their contents
Use VWS, Internet, WeatherFlash dialog
Set the UserID to 'DEMO' (all caps)
Set the timer to 5 seconds
In the Active Server Page section:
put the full url in the text box for the wxf-submit.php script like
press Close to save the setting and close the dialog box.
You should now be able to see the updates happening at
you can also run the configuration test script provided in the wflash directory:
which should show
"Test concluded .. no errors found. WeatherFlash data uploads should work correctly based on permissions."
Note: if you used the wflash/ name on your website, then no further changes are needed in the Settings-weather.php or the ajaxVWSwx.js AJAX script and you should have AJAX updates available on your website.
If you changed the name or location on your website, make sure you update both Settings-weather.php and ajaxVWSwx.js with the new directory name.
Setup graphs files for display on wxgraphs.php
Use the VWS, Modify Display, Graph dialog
Set the checkboxes to those shown in the above image, and press Close to save the settings.
Use the VWS, Internet, FTP Jpeg Settings dialog
Press the Calendar button under FTP Automated Schedule
Select Schedule, set Check Every 5 minutes, press Close to save settings.
Press Close on Jpeg FTP Settings dialog to save settings.
Now view http://www.yourwebsite.com/wxgraphs.php page and you should see all your graphs displayed.
Generate your own VWStags.php
This procedure is optional, but recommended if you have setup VWS to obtain nearby METAR station data for you. If that is the case, then you can generate a new VWStags.htx file which will contain the custom tags for the selected METAR stations so you can use that data in your custom wx....php pages.
Use the VWS, Internet, HTML tags dialog
Press the Save File icon next to the "Complete Tag List" legend.
That will open a tags.txt file in notepad. Save that file as 'tags.txt' to your document root of your website.
Press Close to exit the HTML Tags dialog.
Upload the new tags.txt file to your website.
To generate a new VWS-tags.htx file, use your browser to go to either:
http://www.yourwebsite.com/gen-VWStags.php?comments=yes (produces a larger file with comments)
http://www.yourwebsite.com/gen-VWStags.php?comments=no (produces a smaller file without comments)
In the browser, do a 'Save As...', select the type as 'Text', and save the file to your c:\VWS\templates directory to replace the VWStags.htx file there.
Comment: there is a problem with the tags.txt file generated by VWS that you should be aware of: the list doesn't contain the ^vzl###^ (Yesterday Low name-of-variable) entries. The gen-VWStags.php script adds those missing entries to the resulting VWStags.htx file.
The problem was reported to the VWS author.