At 11:37 09.07.2003 -0700, you wrote:
>I was wondering if PHP or a similar language could be compiled to work on=
>the Ethernut system? I was just wondering because of the success of=20
>Adam's webserver that survived a Slashdotting. I figured that you could=20
>build in a simple scripting langauge into one of these units.
That's an idea that I had a few months ago when I made the ethernet module=
for the C64. I just started to learn PHP, and it very much reminded me of=20
Basic (I learned Basic on ZX81 and C64). Now, since there's already a Basic=
interpreter in the C64, I thought it would be an easy thing to call the=20
interpreter out of Contiki to run simple programs that generate dynamic web=
Everyone on the C64 knows about Simon's Basic, a Basic extension for=20
graphics and easy game programming. How about Adam's Basic for easy=20
web-scripting? You could think of an implementation of the IO stream as an=
already-opened channel for the Basic. Let's assume channel#5 is the web=20
channel, something like this would be pretty self-explaining:
10 INPUT#5,A$:REM this comes from the HTTP line
40 PRINT#5,"<meta http-equiv=3D"Content-Type" content=3D"text/html;=20
50 PRINT#5,"<title>Dynamic web page demo</title>"
70 IF A$=3D"magicword1" THEN GOSUB magicnumber1
80 IF A$=3D"magicword2" THEN GOSUB magicnumber2
[plus the magicnumber routines here]
..how about it?