1. Euphoria and CGI
- Posted by "Michelle Rogers" <michellerogers at bellsouth.net> Jul 29, 2004
- 760 views
I have a CGI question. How do you make a page automatically refresh? Like...there are several things that I want to do like this. And, this example is not one of them..but would be an easy example of what I'm looking for... Example: What if you put a clock at the top of your page and you wanted the clock to automatically refresh every minute, so that you didn't have to click a "reload" button to make the clock stay on the right minute. How would you do this? (I'm using Euphoria/Windows with Apache on my own computer, if any of that makes any difference) Michelle Rogers
2. Re: Euphoria and CGI
- Posted by Mario Steele <eumario at tuscanchat.com> Jul 29, 2004
- 737 views
Michelle Rogers wrote: > > >I have a CGI question. How do you make a page automatically refresh? >Like...there are several things that I want to do like this. And, this >example is not one of them..but would be an easy example of what I'm looking >for... >Example: >What if you put a clock at the top of your page and you wanted the clock to >automatically refresh every minute, so that you didn't have to click a >"reload" button to make the clock stay on the right minute. How would you >do this? (I'm using Euphoria/Windows with Apache on my own computer, if any >of that makes any difference) > > >Michelle Rogers > > The only way to implement this feature is in the Header tags Example: <html> <head> <meta http-equiv="Refresh" content="1; URL=http://128.0.0.1/this_page.exw"> </head> <body> <center><a href="http://128.0.0.1/this_page.exw">Refresh</a></center> </body> </html> The first part of the content, seperated by a semi-colon, is the timeout waiting period. 1 means it'll wait 1 second, 0 means it'll automatically refresh. If you want to use re-direct, the easy way to do that is: puts(1,"Location: http://128.0.0.1/this_page.exw\n\n") That's what you would output automatically, before _ANY_ headers are sent. Headers consist of: puts(1,"Content-type: text/html\n\n") puts(1,"Content-type: text/plain\n\n") puts(1,"Content-type: image/gif\n\n") puts(1,"Content-type: image/jpeg\n\n") etc etc Hope this helps.
3. Re: Euphoria and CGI
- Posted by "Unkmar" <L3Euphoria at bellsouth.net> Jul 29, 2004
- 736 views
Right, What he said. However I wouldn't use that method for any page that was larger than the screen. The reload/refresh will cause the page to reset to the top. You've read 2 screens worth of a 5 screen webpage and it decides to reload on you because of the timer. Very annoying. It is good for 10 second delay between reloads of a 10 second updated image. Slow webcam. 20 second, 30 second. Whatever. Also good for webpage designing. Set it to reload to the current page at an anchor spot. file:///C:/page.htm#edit_area <a name="edit_area"></a> Then when it reloads it will always jump down to where you are editing. But I usually find it faster & easier to ALT-Tab to reach the browser, then press F5 for refresh. I usually am just flipping back and forth between my editor and the browser. A single Alt-Tab from each keeps flipping me back and forth. unkmar ----- Original Message ----- From: "Mario Steele" <eumario at tuscanchat.com> To: <EUforum at topica.com> Sent: Thursday, July 29, 2004 2:07 AM Subject: Re: Euphoria and CGI > > > Michelle Rogers wrote: > > > > >I have a CGI question. How do you make a page automatically refresh? > >Like...there are several things that I want to do like this. And, this > >example is not one of them..but would be an easy example of what I'm looking > >for... > >Example: > >What if you put a clock at the top of your page and you wanted the clock to > >automatically refresh every minute, so that you didn't have to click a > >"reload" button to make the clock stay on the right minute. How would you > >do this? (I'm using Euphoria/Windows with Apache on my own computer, if any > >of that makes any difference) > > > > > >Michelle Rogers > > > > > The only way to implement this feature is in the Header tags > > Example: > <html> > <head> > <meta http-equiv="Refresh" content="1; URL=http://128.0.0.1/this_page.exw"> > </head> > <body> > <center><a href="http://128.0.0.1/this_page.exw">Refresh</a></center> > </body> > </html> > > The first part of the content, seperated by a semi-colon, is the timeout > waiting period. 1 means it'll wait 1 second, 0 means it'll > automatically refresh. If you want to use re-direct, the easy way to do > that is: > puts(1,"Location: http://128.0.0.1/this_page.exw\n\n") > That's what you would output automatically, before _ANY_ headers are sent. > Headers consist of: > puts(1,"Content-type: text/html\n\n") > puts(1,"Content-type: text/plain\n\n") > puts(1,"Content-type: image/gif\n\n") > puts(1,"Content-type: image/jpeg\n\n") > etc > etc > > Hope this helps. > > --^---------------------------------------------------------------- > This email was sent to: l3euphoria at bellsouth.net > > EASY UNSUBSCRIBE click here: http://topica.com/u/?b1dd66.b2VP8n.bDNldXBo > Or send an email to: EUforum-unsubscribe at topica.com > > For Topica's complete suite of email marketing solutions visit: > http://www.topica.com/?p=TEXFOOTER > --^---------------------------------------------------------------- > >
4. Re: Euphoria and CGI
- Posted by cklester <cklester at yahoo.com> Jul 29, 2004
- 746 views
See this: http://web.nwe.ufl.edu/writing/help/web/authoring/html/tips/refresh.html Basically, it's a META tag inside the <HEAD>: <META HTTP-EQUIV="Refresh" CONTENT="15"> -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
5. Re: Euphoria and CGI
- Posted by "Michelle Rogers" <michellerogers at bellsouth.net> Jul 29, 2004
- 724 views
so what if you were gonna code one of those nice cute little arcade games like at games.yahoo.com? Can't do that with euphoria? Michelle Rogers ----- Original Message ----- From: "cklester" <guest at RapidEuphoria.com> To: <EUforum at topica.com> Sent: Thursday, July 29, 2004 9:50 AM Subject: Re: Euphoria and CGI > > > posted by: cklester <cklester at yahoo.com> > > See this: > > http://web.nwe.ufl.edu/writing/help/web/authoring/html/tips/refresh.html > > Basically, it's a META tag inside the <HEAD>: > > <META HTTP-EQUIV="Refresh" CONTENT="15"> > > > -=ck > "Programming in a state of EUPHORIA." > http://www.cklester.com/euphoria/ > > > >
6. Re: Euphoria and CGI
- Posted by cklester <cklester at yahoo.com> Jul 29, 2004
- 731 views
Michelle Rogers wrote: > so what if you were gonna code one of those nice cute little arcade games > like at games.yahoo.com? Can't do that with euphoria? Not until somebody creates a browser plug-in for Euphoria, like you have for Flash or java (in which those games are programmed). That should be easy, though. Bug one of the gurus for it. Or even Rob Craig himself! Rob?!?!?! -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
7. Re: Euphoria and CGI
- Posted by "Michelle Rogers" <michellerogers at bellsouth.net> Jul 29, 2004
- 716 views
*flutters her eyelashes at ck* umm...if it's easy can i just bug you for it? *giggles* Michelle Rogers ----- Original Message ----- From: "cklester" <guest at RapidEuphoria.com> To: <EUforum at topica.com> Sent: Thursday, July 29, 2004 11:52 AM Subject: Re: Euphoria and CGI > > > posted by: cklester <cklester at yahoo.com> > > Michelle Rogers wrote: > > > so what if you were gonna code one of those nice cute little arcade games > > like at games.yahoo.com? Can't do that with euphoria? > > Not until somebody creates a browser plug-in for Euphoria, > like you have for Flash or java (in which those games are programmed). > > That should be easy, though. Bug one of the gurus for it. Or even > Rob Craig himself! Rob?!?!?! > > -=ck > "Programming in a state of EUPHORIA." > http://www.cklester.com/euphoria/ > > > >
8. Re: Euphoria and CGI
- Posted by "Michelle Rogers" <michellerogers at bellsouth.net> Jul 29, 2004
- 714 views
*flutters her eyelashes at Rob* c'mon Robbie...pleaseie-weezie..can we get a plug-in? Besides *jumps up and down* it'll be good advertising...we'll have euphoria all over the 'net then *grins* *flutter* *flutter* Michelle Rogers ----- Original Message ----- From: "Brian Broker" <bkb at cnw.com> To: <EUforum at topica.com> Sent: Thursday, July 29, 2004 1:53 PM Subject: RE: Euphoria and CGI > > > cklester wrote: > > > > Michelle Rogers wrote: > > > > > so what if you were gonna code one of those nice cute little arcade > > > games > > > like at games.yahoo.com? Can't do that with euphoria? > > > > Not until somebody creates a browser plug-in for Euphoria, > > like you have for Flash or java (in which those games are programmed). > > > > That should be easy, though. Bug one of the gurus for it. Or even > > Rob Craig himself! Rob?!?!?! > > > > -=ck > > "Programming in a state of EUPHORIA." > > http://www.cklester.com/euphoria/ > > Yeah, I suggested something like that back in 2000. Good thing I didn't > hold my breath... > > http://www.listfilter.com/cgi-bin/esearch.exu?thread=1&fromMonth=5&fromYear=5&toMonth=7&toYear=5&keywords="embedded+euphoria" > > > -- Brian > > > >
9. Re: Euphoria and CGI
- Posted by cklester <cklester at yahoo.com> Jul 29, 2004
- 719 views
Michelle Rogers wrote: > > *flutters her eyelashes at ck* umm...if it's easy can i just bug you for > it? Well, you'll notice I said bug a *guru*! That would have to be someone else. (I'm thinking Matt Lewis might be a good start...) Can anybody else comment on this? :) -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
10. Re: Euphoria and CGI
- Posted by cklester <cklester at yahoo.com> Jul 29, 2004
- 730 views
Michelle Rogers wrote: > > *flutters her eyelashes at Rob* > > c'mon Robbie...pleaseie-weezie..can we get a plug-in? Besides *jumps up and > down* it'll be good advertising...we'll have euphoria all over the 'net > then *grins* *flutter* *flutter* > Michelle Rogers Just don't let Kat find out!!! <meow> <grrrrr>
11. Euphoria and CGI
- Posted by Jerry Story <story.jerry at gmail.com> Jun 20, 2007
- 680 views
Why doesn't this work?
#!./exu puts(1, "<html><head><title>Quackery Game</title></head>\n") puts(1, "<body bgcolor=\"#FFFFFF\">\n") puts(1, "</body></html>\n")
I tried with /euphoria in /public_html and in the top level. In /public_html I get: #!./exu puts(1, "\n") puts(1, "\n") puts(1, "\n") In the top level it does nothing. /euphoria consists of /bin and /include Also #!/home/jstory/euphoria/bin/exu doesn't work on my computer even tho the path is correct.
12. Re: Euphoria and CGI
- Posted by Robert Craig <rds at RapidEuphoria.com> Jun 20, 2007
- 706 views
Jerry Story wrote: > > Why doesn't this work? > > }}} <eucode> > > #!./exu > > puts(1, "<html><head><title>Quackery Game</title></head>\n") > puts(1, "<body bgcolor=\"#FFFFFF\">\n") > puts(1, "</body></html>\n") > > </eucode> {{{ > > I tried with /euphoria in /public_html and in the top level. > > In /public_html I get: > #!./exu puts(1, "\n") puts(1, "\n") puts(1, "\n") > > In the top level it does nothing. > > /euphoria consists of /bin and /include > > Also > #!/home/jstory/euphoria/bin/exu > doesn't work on my computer even tho the path is correct. - be careful that your #! line has just \n as the line terminator, *not* \r\n (DOS/WIN style) - be sure that exu has execute permission by all users Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
13. Re: Euphoria and CGI
- Posted by Gary Shingles <eu at 531pi.co.nz> Jun 22, 2007
- 701 views
Jerry Story wrote: > > Why doesn't this work? > > }}} <eucode> > > #!./exu > > puts(1, "<html><head><title>Quackery Game</title></head>\n") > puts(1, "<body bgcolor=\"#FFFFFF\">\n") > puts(1, "</body></html>\n") > > </eucode> {{{ > > I tried with /euphoria in /public_html and in the top level. > > In /public_html I get: > #!./exu puts(1, "\n") puts(1, "\n") puts(1, "\n") > > In the top level it does nothing. > > /euphoria consists of /bin and /include > > Also > #!/home/jstory/euphoria/bin/exu > doesn't work on my computer even tho the path is correct. I don't see you outputting a content type, eg puts(1, "Content-type: text/html\n\n") (unless that was assumed in your example)
14. Re: Euphoria and CGI
- Posted by Jerry Story <story.jerry at gmail.com> Jun 22, 2007
- 696 views
Gary Shingles wrote: > I don't see you outputting a content type, > > eg puts(1, "Content-type: text/html\n\n") > > (unless that was assumed in your example) I forgot that. Here is a modified version:
#!/public_html/cgi-bin/euphoria/bin/exwc.exe without warning puts(1, "Content-type: text/html\n\n") puts(1, "<html><head><title>Quackery Game</title></head>\n") puts(1, "<body bgcolor=\"#FFFFFF\">\n") puts(1, "</body></html>\n")
This is what it does. #!/public_html/cgi-bin/euphoria/bin/exwc.exe without warning puts(1, "Content-type: text/html\n\n") puts(1, "\n") puts(1, "\n") puts(1, "\n") On a blue screen.
15. Re: Euphoria and CGI
- Posted by Guillermo Bonvehi <gbonvehi at gmail.com> Jun 22, 2007
- 676 views
- Last edited Jun 23, 2007
It seems the web server you're using is not executing that file but just giving it's contents. Be sure your server is setup to execute it. Best regards, Guillermo Bonvehi
16. Re: Euphoria and CGI
- Posted by Jerry Story <story.jerry at gmail.com> Jun 22, 2007
- 675 views
- Last edited Jun 23, 2007
Why doesn't this run on my computer?
#!/home/jstory/euphoria/bin/exu without warning puts(1, "Content-type: text/html\n\n") puts(1, "<html><head><title>Quackery Game</title></head>\n") puts(1, "<body bgcolor=\"#FFFFFF\">\n") puts(1, "</body></html>\n")
This is what it does. #!/home/jstory/euphoria/bin/exu without warning puts(1, "Content-type: text/html\n\n") puts(1, "\n") puts(1, "\n") puts(1, "\n") The #! line has the correct path. exu works on everything else.
17. Re: Euphoria and CGI
- Posted by c.k.lester <euphoric at cklester.com> Jun 23, 2007
- 674 views
Jerry Story wrote: > > This is what it does. > #!/home/jstory/euphoria/bin/exu without warning puts(1, "Content-type: > text/html\n\n") > puts(1, "\n") puts(1, "\n") puts(1, "\n") Have you modified your htaccess files? Sounds like Apache (or whatever web server you're using) doesn't know what to do with Euphoria source files.
18. Re: Euphoria and CGI
- Posted by Jerry Story <story.jerry at gmail.com> Jun 23, 2007
- 700 views
c.k.lester wrote: > > Jerry Story wrote: > > > > This is what it does. > > #!/home/jstory/euphoria/bin/exu without warning puts(1, "Content-type: > > text/html\n\n") > > puts(1, "\n") puts(1, "\n") puts(1, "\n") > > Have you modified your htaccess files? Sounds like Apache (or whatever web > server you're using) doesn't know what to do with Euphoria source files. What, who is htaccess? I'm using Opera. Opera understands html files. Firefox does the same thing, with a different shade of blue.
19. Re: Euphoria and CGI
- Posted by Gary Shingles <eu at 531pi.co.nz> Jun 23, 2007
- 675 views
Jerry Story wrote: > > c.k.lester wrote: > > > > Jerry Story wrote: > > > > > > This is what it does. > > > #!/home/jstory/euphoria/bin/exu without warning puts(1, "Content-type: > > > text/html\n\n") > > > puts(1, "\n") puts(1, "\n") puts(1, "\n") > > > > Have you modified your htaccess files? Sounds like Apache (or whatever web > > server you're using) doesn't know what to do with Euphoria source files. > > What, who is htaccess? > I'm using Opera. Opera understands html files. > Firefox does the same thing, with a different shade of blue. You should have a read of this link (on the Wiki): <A HREF="http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F">http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F</A> Halfway down it explains how to set up your web server to execute the CGI script. Gary
20. Re: Euphoria and CGI
- Posted by Dan Moyer <danielmoyer at prodigy.net> Jun 23, 2007
- 708 views
- Last edited Jun 24, 2007
Gary Shingles wrote: > > Jerry Story wrote: > > > > c.k.lester wrote: > > > > > > Jerry Story wrote: > > > > > > > > This is what it does. > > > > #!/home/jstory/euphoria/bin/exu without warning puts(1, "Content-type: > > > > text/html\n\n") > > > > puts(1, "\n") puts(1, "\n") puts(1, "\n") > > > > > > Have you modified your htaccess files? Sounds like Apache (or whatever web > > > server you're using) doesn't know what to do with Euphoria source files. > > > > What, who is htaccess? > > I'm using Opera. Opera understands html files. > > Firefox does the same thing, with a different shade of blue. > > You should have a read of this link (on the Wiki): <A HREF="<a > href="http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F">http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F</a>"><a > href="http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F">http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F</a></A> > > Halfway down it explains how to set up your web server to execute the CGI > script. > > Gary The above mentioned link didn't work for me, maybe this version of the link will: http://euwiki.ayo.biz/Can_Euphoria_do_CGI%3F Dan Moyer
21. Re: Euphoria and CGI
- Posted by Jerry Story <story.jerry at gmail.com> Jun 25, 2007
- 691 views
- Last edited Jun 26, 2007
I'm trying to run the following code on my computer. (If I can't get it happening on my computer, then I probably can't get it happening on my ISP's computer.)
#!/home/jstory/euphoria/bin/exu without warning puts(1, "Content-type: text/html\n\n") puts(1, "<html><head><title>Quackery Game</title></head>\n") puts(1, "<body bgcolor=\"#FFFFFF\">\n") puts(1, "</body></html>\n")
What next? I'm too stupid to understand the euwiki article about CGI_Apache. http://euwiki.ayo.biz/CGI_Apache
22. Re: Euphoria and CGI
- Posted by c.k.lester <euphoric at cklester.com> Jun 25, 2007
- 676 views
- Last edited Jun 26, 2007
Jerry Story wrote: > > What next? Jerry, try my docs at http://cklester.com/euphoria/?page=apache. Let me know if you have any questions.
23. Re: Euphoria and CGI
- Posted by Jerry Story <story.jerry at gmail.com> Jun 25, 2007
- 682 views
- Last edited Jun 26, 2007
c.k.lester wrote: > > Jerry Story wrote: > > > > What next? > > Jerry, try my docs at <a > href="http://cklester.com/euphoria/?page=apache">http://cklester.com/euphoria/?page=apache</a>. > > Let me know if you have any questions. What is Apache? (I looked this up on Google but I don't understand anything.) How can I know whether I have Apache installed? What does Apache have to do with running a html file on firefox or opera?
24. Re: Euphoria and CGI
- Posted by c.k.lester <euphoric at cklester.com> Jun 25, 2007
- 688 views
- Last edited Jun 26, 2007
Jerry Story wrote: > What is Apache? (I looked this up on Google but I don't understand anything.) Apache is the program on your computer that serves web pages. > How can I know whether I have Apache installed? You will have installed it. Go download it and install it to your computer, then read up on it. Time for an education if you want to go further. > What does Apache have to do with running a html file on firefox or opera? You can view an HTML file without Apache, but you need Apache when you want dynamic serving of web pages. That is, they are not "static" HTML text files, but actually programs that need an interpreter. For instance, http://www.cklester.com/euphoria/bbcmf/ is being generated with a FreeBSD Euphoria interpreter and served by Apache on FreeBSD 4.x.