Re: Linux Webserving Exe

new topic     » goto parent     » topic index » view thread      » older message » newer message

C. K. Lester writes:
> What file would I need to put in my cgi-bin folder in order
> to have EUPHORIA serve up some data for me? I'd
> love to serve info from an EDS database or something!
> BTW, my site is hosted on a Linux box.
> How would I access it? What would I need to imbed
> in my HTML for EUPHORIA to give me the data?
> And how would my EUPHORIA program need to
> output data? puts()? print()?

If you go to the Recent User Contributions page,
and use your Web browser to View the Source
to contrib.htm, you'll see that there's a <form> ... </form>
section for the File Search. Copied below, but
it might get messed up with line-wrap...

<form method=GET action="cgi-bin/asearch.exu">

<table border=0 cellpadding=0 cellspacing=0 width=600>
<tr><td width=80 nowrap></td><td width=120>
<font face="Arial, Helvetica" size=+1 color="#990033">File
Search:</font></td>
<td width=300>

<font face="Arial, Helvetica" size=-2>
<input type="CHECKBOX" name="dos" CHECKED><font
color="#FF8080"><b>DOS</b>&nbsp;&nbsp;</font>
<input type="CHECKBOX" name="win" CHECKED><font
color="#8080FF"><b>WIN</b>&nbsp;&nbsp;</font>
<input type="CHECKBOX" name="lnx" CHECKED><font
color="#60EE60"><b>LNX</b>&nbsp;&nbsp;</font>
<input type="CHECKBOX" name="gen" CHECKED><font
color="#808080"><b>GEN</b></font>
</font>

<input type="text" name="keywords" size=38>
<br><font face="verdana, arial, geneva" size=-2 color="#333333">Type one or
more words.</font>
</td>
<td width=90><input type="submit" value="Search!"></td>
</tr>
</table>
</form>

The above HTML code is a form that lets the user
specify platforms and keywords. The Euphoria
program source that is executed when the user
clicks "Search!" is available if you click the
"Powered by Euphoria" link. The program name
is asearch.exu and it's located in my cgi-bin directory
with execute permissions turned on. asearch.exu
reads an EDS database containing all the programs
in the archive. It outputs the HTML page
that the user sees as his search result
(one magic line has to be output first, then the HTML page).

Suppose the user searches the WIN platform only,
for "win32lib derek". Your browser will transmit the
URL (see address section of your brower).

http://www.rapideuphoria.com/cgi-bin/asearch.exu?win=on&keywords=win32lib+de
rek

What asearch.exu sees is just the part after the '?':
"win=on&keywords=win32lib+derek"
This is made available to asearch.exu in the
query_string environment variable:
getenv("query_string") or maybe
getenv("QUERY_STRING")

Maybe that will help you to get started.
Good Luck.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu