RE: cgi

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

rolf.schroeder at desy.de wrote:
> Hi Cassidy,
> 
> is it absolutely clear that the program line:
> 
>   puts(1,"Location: /resource.xxx\n\n")
> 
> is the first output of the program at the CGI SERVER SIDE called by the
> client browser?
> 
> I append an example including an image. make a DIR 'test' under
> 'cgi-bin' on your CGI server, copy all files into the 'test' dir, run
> 'bindw test' to create en win32 executable and call from your browser:
> 
>   'http://ServerName/cgi-bin/test/test.exe'
> 
> enjoy!
> 
> Have a nice day, Rolf

Rolf,
No it is NOT NECESSARY.  This is the *working* version of the cgi half 
of my program:

image.ex (image.exe when bound)
--------
without warning

procedure main()
 object request, server
 sequence outstring
 request = getenv("QUERY_STRING")
 server = getenv("SERVER_URL")
   if sequence(request) then
      outstring = "Location: " & server & request & "\n\n"
      puts (1, outstring)
   end if
end procedure

main()
--------
You need images in your default directory, then (running Xitami, anyway) 
point your browser to

http://yourserver/cgi-bin/image?imagename.gif

And it runs fine...I get back whatever image exist at iamgename.gif.  
This was my goal and this is what it is doing.
The other half of my program is what generates the .gifs.  So now, 
everytime Winamp changes songs, the image is changed.  And everytime 
someone requests

http://myserver/cgi-bin/image?isplaying.gif

they get the currently playing song, even if they had an older 
isplaying.gif in browser cache.  As soon as I get the configs finished 
I'll send you a copy so you can see exactly what is going on. 

Did you read the cgi information from 
http://hoohoo.ncsa.uiuc.edu/cgi/out.html ?

In any event, thank you for your effort, but I've got it working now, 
for sure.  I'm using it :).

-=Cassidy=-

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

Search



Quick Links

User menu

Not signed in.

Misc Menu