Does anyone have a PHP script that they’d be willing to share with me that can parse the clientraw files in a way that makes it ‘easy’ to use various items of data from the files for further processing?
I’ve searched the forum and there are scripts linked on various domains that no longer exist and one chunk of code that looked useful until I discovered that somewhere in the last 10+ years since it wa sposted has become truncated and no longer works.
If my plan works then I’ll evenually release code for anyone (with clientraw files) to use to do something new. I won’t release the original script, just a derivative of it that does something different.
I just tried it. It’s got requirements for a Settings.php file which isn’t included in the ZIP file so I’m not sure what’s needed.
EDIT:
Reading the blurb more closely I think this script is designed to work within the Saratoga Template so it’s probably referring to the template Settings.php file. I don’t have the template installed but I expect the Settings file has a lot of stuff in it that’s not relevant so it might be tricky to figure out which settings are/aren’t needed.
The wxclientraw*.php pages only use one entry from the Settings.php file $TITLE= $SITE['organ'] . " - Your Station Clientraw"; – the $SITE[‘organ’] (organization text).
All the wxclientraw*.php pages are specific for the Saratoga template, but you don’t need to use that.
The clientraw*.php pages generate the raw HTML from parsing the respective clientraw*.txt files.
I’ll pack up my TNET flavored version for you too.
I have written a script and it’s produced output in a useful format so that’s a good start. Now that I’ve got the basics working I need to go back to tidy up the code as well as adding some more error trapping.
Hi Dale,
The clientraw parser on my Saratoga-Weather.org - Legacy Scripts page contains everything you need to parse/display the files from your website. The version I sent Chris was modified to display clientraw data from other websites (and use the old TNETweather styling in honor of Kevin Reed). I’ll email you the link for that version, but suggest that you may not want to install the other-site version on your site so others may potentially abuse your site via specious accesses to the script. The other-sites script is pretty self-protective and I run my own VPS server so if it gets abused, it won’t impact another sites unlike on a shared hosting service.
The ‘guts’ of both scripts for parsing/display are identical … the styling is different.