metacard & cgi - example

jbv jbv.silences at club-internet.fr
Mon Apr 1 14:50:01 EST 2002


Sorry if I'm late on this thread.

Shortly, here's what I'm presently doing with mc cgi.

There's a rally going on in the desert of south Marocco
(for more detail : http://www.tropheeaichadesgazelles.com/)

Each vehicle features a GPS system. GPS data are sent via
satellite, then via email (as attached data files) to 1 of our
servers. When an email is received, it triggers a mc cgi script.
That script decodes the GPS data (longitude / latitude / time)
into x/y values, and updates the content of one of the HTML
files of the website. GPS data are updated every 30 minutes,
and they accumulate in the file.

in french :
http://www.tropheeaichadesgazelles.com/LIVE/FR/index.htm

in english :
http://www.tropheeaichadesgazelles.com/LIVE/FR/index.htm

best with IE5+


On the other hand, one of the crew members (in charge of security),
is in the desert in a 4WD with a laptop and a satellite cellular
phone. Since he needs to keep track of the position of each vehicule in
real time, and since connecting to the web would be too slow & too
expensive, we have set up the following system : his laptop HD
features a duplicate of the website. The mc script on our server,
when receiving GPS positions via email, also generates a small txt
file (about 500 bytes) featuring the latest positions (X/Y pixels
values). On the laptop HD I have also installed a small app (made
with MC of course) that :
- opens the connection through the cellular phone
- downloads the small txt file (with a simple get URL)
- updates the HTML file on the HD (just like the script does on
the server)
- launches the default browser
- opens the updated file in the browser window,
- converts the XY pixel values into longitude / latitude format
and saves it on the HD as a separate HTML table file that can be
openened
in a pop-up window inside the page automatically opened in the
browser.

In other words, with nothing more than a double-click and a few
seconds of waiting, the guy gets the latest positions of all
vehicles on a graphic interface in the middle of the desert.

of course, this small app uses a very similar script as the one
on the server, and it didn't take more than a few hrs to make it.
Needless to say that being able to use the same code for both
purposes was really apreciated !!!

Cheers
JB






More information about the metacard mailing list