wow. this is really useful.
I also used

Content-Disposition: attachment; filename="$filename"\n

To set the filename when they get to my script download.cgi

For sessioning etc I am using a mysql table. The table keeps the user id, the timestamp start time, the timestampt last access time, the session id, the ip the session is valid for, some other details about what the user is doing right now.
For example, this is where i am keeping their last selected file id.
They can browse files they have been assigned access to, and if they select the file- the script double checks they have authority to that file and inserts the file id into their session row (in the mysql sessions table).

This way, if they choose to download, we already know what from a previous step.

By the way, this app will work via ssl. and I am going to seek out for the app to check that it *is* serving via ssl. Otherwise poop out. I know, to open source this, i have to allow for an override.

Man.. am I glad I came here for help. You guys rock. I have absolutely no problems with being told where i'm messing up- I bow before you.

background
This app is being made to allow business to share their docs with clients. They need some strange customizations for allowing very precise per client access to files and what they can do with them. I want to open source the basic system for everyone to use, and I am struggling to keep any customizations as far appart from the basic thing as possible. I hope to have it up on sourceforge in a few months. I know it will get shot out of the sky for stupidity, but- I trust the process.


In reply to Re^2: at job help ? by leocharre
in thread at job help ? by leocharre

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.