web server. If you are editing a local copy of this file, make sure to upload your changes to your web server.
Then
copy the necessary files to your web site
. Typically you will use an FTP client such as Filezilla or
whatever is provided by your web hosting service to copy the files out to your web server.
When you install the WD7800 Programming Tools, the necessary files are locating in
My Documents\Worth Data\Hardware\Cloud Server Demo Source
They are
install.php
cloud.php
index.html
varstermrouter.inc
When you copy these out to your web server, you should put them in a subfolder to keep them separate from
the rest of the content of your web site.
Run the
install.php
script
by opening your web browser and going to
www.mywebsite.com/cloudfolder/install.php
If you see any error messages, the most likely cause is incorrect settings in
varstermrouter.inc
. Use your
text editor to view the contents of
install.php
for further details.
Full source code of the Cloud Server is provided
. You can use it as a starting point for creating your own
custom version. Here is a summary of the function of each file:
•
cloud.php
is the Terminal interface to the Cloud Application. That is, this is the web page that the
Terminal uses to communicate with. You can browse it with a regular web browser, but you won't
see much because the Terminal creates very specific URL commands that
cloud.php
uses.
•
index.html
is the user interface to the Cloud Application. It is accessed as a regular web page.
•
varstermrouter.inc
includes the password and username for the system to access your web servers
database back-end. Unless you modify the code to work with a different database, this must be
MySQL version 5 or later.
How To Use The Cloud Server
First, some more detail about the Cloud Server. Mentioned above are the files that make up the system, but
the real core of the process is in how the cloud.php script uses the tables associated with the Cloud Server.
Tables
proj_program
proj_terminals
proj_data
proj_program
stores the list of low-level Terminal commands that define how the Terminals behave.
Another way to think of this table is as the “Terminal program definition”. The key features of this table is
each record contains an order code (“program pointer” for program sequence), where to “jump” in the event
of a “yes” or “no” terminal response, and the actual program script to send to the Terminal for this prompt.
58