PHP code to parse clientraw files

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.

Sure… I’ve updated RelayWeather’s clientraw (et al) parser

Also, I have Tnetweather’s (Kevin’s) up-to-date for PHP8+ scripts running on my site at - Weather-Display clientraw*.txt parser and would be happy to .zip them up for you if you like.

Oooh a cornucopia (or maybe a plethora) of scripts. It’s midnight here now so I’ll take a look tomorrow. Thanks for the page and the link :slight_smile:

It would be good to look at those too if that’s ok.

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.


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.

1 Like

All packed up… sent you a message with download link.

Best regards,

1 Like

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.

Ken, I’m always happy to learn, and wonder if you’d share a link here we can pick up on, or if you’d rather not, be able to send me the link too? Dale

Hi Dale,
The clientraw parser on my - 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.