[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
More on my xAP software
- Subject: More on my xAP software
- From: jamestraynor
- Date: Sun, 27 Apr 2003 16:53:00 +0000
As usual with these things a few bugettes have cropped up, but they
are very minor(C>F conversion was out and both news and weather sent
their data every 30sec instead of every 10mins :-).I will fix those
and tidy up the gui a bit and release the finals a bit later on,
probably by Friday.
I am also finalising a xAP > mysql cacher. Basically I wanted to get
at xAP data from my intranet, but from within my pages not from
another web server. I also wanted it keep a short history of xAP
messages (last ten) so as give a "Previous" section to things on
the
site. This is how it currently works (xAP weather as example):
Table xap_current
Source mi4.weather.egll
Class weather.report
Target
UID FFwhatever
Section weather.egll
Item tempc
Value 25.0
Timestamp 20030404152010
History 1
messageid 22
Every incoming xAP message is broken down into each item.
Each row is 1 item.
Each incoming xAP message is given a new messageID
( to allow putting the message back together)
The received message is given history of 1.
Every other message with the same source,class,target,uid,section,item
has it's history increased by 1. Any histories higher than a limit are
deleted.
Slashes are added to any odd character.
So with that all that running from my phpnuke website I can add this
block:
<?php
global $db;
$sql="SELECT value FROM xap_current where item='icon' and
class='weather.report' and section='weather.egll' and history=1";
$result = $db->sql_query($sql);
$row=$db->sql_fetchrow($result);
$icon=$row[value];
$content = "<img
src='images/blocks/weather/".$icon.".jpg'>";
?>
and I get the current weather icon in a nice little box.
Well thats what it does, Is this something people would like or
should I just keep it an internal thing. Also if anyone has any
suggestions on doing this a better way then please say...
James
xAP_Automation Main Index |
xAP_Automation Thread Index |
xAP_Automation Home |
Archives Home
|