Seth wrote:
I am doing a project with a embedded processor. I have a program that
can take the data from the serial port and send it out a tcp port
Do you mean send out of, or to a tcp port..is the embedded stuff a
sender of data via TCP or a listener for requests, on a port?
Send out via a port of my choosing makes no sense. TCP i ahbitually sent
on random ports. Its where thelistener is boud to that is the key thing.
of
my choosing. I want to be able to read that stream and display in on
a website.
Php may not be your friend here. What you want is a daemon that can read
the data and update a web page..independtly of whether someone is
watching the pages at all..
Or do you want a user to click on a page,and have that page then go and
read the embedded data? And put a timed refersh on that page?
Depends whether you want to e.g./ record the data for posterity on a
timed basis, or just on a 'need to know/show' one.
The data is going to be really basic just a couple of temperatures. I
just want to have two text boxes that update the temperature every
couple minutes or so. I have read some information on the php site
but I don't know where to start. Any help would be great.
If your embedded device can *listen* on a port, you want to explore the
fsockopen() and fread() commands in the php library.
SEE
http://www.php.net/manual/en/function.fsockopen.php
You would use something like
$fp=fsockopen("$MyEembeddedIPAddress",$myspecialpo rt);
and then an fread on $fp until you had the data, and then an fclose($fp);
Thanks,
Seth