Clientraw.txt use

I would like to start work on my next version of a website. While I don’t think I can do something like TNet, Carter Lake, etc. I do think there might be a way of working with just the data. After looking a bit, I think that one might use a technique of stuffing tags into WXxx.html and parsing it with Carter Lake’s neat PHP parser. But, then I started thinking that since I subscribe to WD Live and MML, and since both use clientraw.txt, there must be a way to parse that file - with PHP, Python, etc. If changes were made, then existing version of WDL since I don’t think it writes to my site or asks my site to go elsewhere for data. I am guessing that Brian adds new data to the END of the clientraw.txt file since that greatly simplifies maintenance and NOBODY does more maintenance than Brian!!!

It seems like if one uses clientraw.txt plus extra they would cut down on traffic, and avoid duplication.

Does this sound like a realistic idea? Brian, would there be any objection? (As a programmer myself, I will not do this if there are)

Any opinions gratefully received. Thanks

New items are added to the end of the clientraw.txt file, although there’s now a specific end of data marker added to the very end of the file so that you know exactly which version of WD created the file and whether the file is clientraw.txt, clientrawdaily.txt or clientrawextra.txt. Your idea will work fine and you won’t be the first one to do it. I doubt if Brian will have any issues with you using the data…after all it is your data!

Some people have used PHP to parse the file. I use Perl. There’s no reason why you couldn’t use Python or any one of the dozens of other languages that live on web servers, so you can choose your favourite.

Hey, Chris,

I just sent you a PM about something different!

Last time I checked, there was the public thing at TNET, but nobody had offered a parser for sale. If there is one, I’d just as soon buy it as write one. Has somebody got one they’d either like to share or sell?


Mine (for MML) is rather specialised because it does a lot more than just parse a single file. I don’t think krelvinaz has ever published his code and I don’t think I’ve seen any others. The basics aren’t actually that difficult to code though. Working out what all the fields are is the trickiest bit and you can see that fairly easily from krelvinaz’s page.

Thanks, Chris,

Ok, I just didn’t particularly want to reinvent the wheel. I recall there was a file listing the contents and I can either use that or else just setup a spreadsheet and compare numbers, then write parsing code in whatever.



Another way would be to setup a custom web page with all the relevant tags for your station and just upload that every minute… IIRC someone, either Tom or Dan is doing it that way…

They grab the tag results they want from the single file for the relevant web page…


I’m not a big fan, but isn’t the XML intended to be used this way?

Thanks, Bob,

I’d really prefer not to do it that way only because the information is already there via clientraw.txt. I’d like to leave some room to upload video from other cameras if I ever get them to work. Parsing clientraw.txt and the others is fairly easy to do, just takes time.


No I don’t think so. If I understand this correctly, the XML gets used by WD at your site and then combined with HTML into pages which are then exported to your site at a frequency you choose. You can certainly mitigate the effect because some stuff isn’t all that time sensitive. Still, clientraw.txt is already being sent and since I can’t stop that anyway, I’d rather just use what is there.

I’m not a PHP programmer, and I know that global variables are considered dangerous, so what I think I might try is to just create a file in a protected folder or something like that.

See this post:
This gives an insight on how to pull info from the clientraw file.

I think for the XML WD is creating an XML data file and that’s what is uploaded to the website. The code in the page on the webserver then pulls the values from the XML file. But, if you can live with the parameters in clientraw.txt then that is a smaller file, the trade off is that you may have to make a lot more calculations to get the values you want for display.


Thanks for that. In that case, I probably should do as you suggest, but I might also create clientraw.txt at the website by processing wd.html or the xml file if that is even possible. It would have the same effect and you’re certainly correct that I wouldn’t have to deal with extra calculations - hey the easy way always works the best for me!

Brian - is that the case? Does the xml file get sent to the website with values or are the value inserted in the html file at your local WD site and the html site exported with values?


I’m using the Carterlake PHP parser for my site here, and it works great!

However, I am just a little bit concerned that if we make the clientraw.txt any larger, it might adversely affect the ‘live’ nature of WDL, as in the bigger the file, the more processing, the longer it takes to upload, making the update gaps longer.

I’d like to leave clientraw.txt as small as possible so that it updates fast, and WDL can make more use of it on a more regular basis.

my 2 cents worth, ex gst. :slight_smile:

Does the xml file get sent to the website with values
yes it does....

This link re xml was posted today in another thread

I thought of the same thing. However, if we create clientraw.txt at the website from some file you upload, you could make it (clientraw) exactly the same size as what it already is. Thus you might delay things, but you wouldn’t slow them down. Still, it seems to me that the best technique is to keep clientraw and just parse it as you need to. That way, clientraw remains Brians, Kevins etc. and that section will always keep working.

I am storing everything in a MySQL table at the website so I just really need to know that “everything” is going to include some particular stuff like heating degree days so that I don’t have to calculate them. But it seems like the general idea is to let WD to as much work as possible and just export the extra stuff needed via tags.
Less coding (I don’t know PHP, but I’m learning), and less work overall.

we have no GST! In fact in NH we don’t even have a regular state sales tax!