Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: deleting a file after loading

by belize (Deacon)
on Nov 28, 2000 at 21:13 UTC ( [id://43709]=note: print w/replies, xml ) Need Help??


in reply to Re: deleting a file after loading
in thread deleting a file after loading

This is the exact problem I am having. But then, the image being generated is based on a search of a database, so that if I reference an external CGI, I have to pass the results of the search, and this I am having trouble doing.

So, I decided to use a subroutine to generate a file, display the file, then delete the file.

Part of my program does call the remote CGI when a single record is returned and it is easy to pass the variables for a single image to be drawn.

If you go to http://www.belizeexplorer.com right now, click on search, and choose Mayan Sites in the Category box, you will see the ASCII come back. Then if you click on the individual links, you will see the program work when it draws a single record.

I think I will have to go back to creating an image, then deleting them after a period of time.

Thanks for your post.

Tony

Replies are listed 'Best First'.
Re: Re: Re: deleting a file after loading
by Fastolfe (Vicar) on Nov 29, 2000 at 00:24 UTC
    What if your search assigned an ID number to each visitor, and you used that ID number with a CGI image generation script to either pull their search terms, or simply retrieve a pre-built image associated with that ID?
    # in the parent CGI script my $id = get_user_id; # just give them a new ID build_image($id, @arguments); # or store the arguments # in a database or something print "<img src='/cgi-bin/fetch_image?$id'>\n"; # or you can be cool and use CGI PATH_INFO stuff: print "<img src='/cgi-bin/fetch_image.cgi/$id.gif'>";
    Then either build the image from the stored information, or retrieve a temp file that matches the ID and send the resulting image, removing the file when it's done.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://43709]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2024-03-28 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found