|
|
Fetch a File List of Categories
- What can I use this script for?
- What should I enter as the path for my download folder?
- Can I call the list of files using SSI?
- My links in the Public form are showing my server path, why?
- Can I add create my own form with extra fields?
-
What can I use this script for?
Fetch a File was written to allow you to grant your web site visitors access to a specified directory on your server. They can then select any number of files from said directory and e-mail the files to themselves or anyone else.
Built in security features ensure only the directory you specify in the admin settings may be accessed. You can also password protect the script.
This script is great for allowing your visitors to download a file or files you offer.
-
What should I enter as the path for my download folder?
You can make only one directory publicly available (and all of it's sub directories). You then specify the file types allowed to be downloaded from those directories.
In the admin section, click on "Settings" then scroll down to "Default Folder". Enter your server's absolute path to (and including) the folder which will be publicly available. E.g.
/home/username/htdocs/downloads
If you'd like all files within the directory(s) to be made available, enter "ALL" in uppercase in the Setting titled "File types to display".
-
Can I call the list of files using SSI?
Yes, if your server supports SSI, you can point your SSI tag to fetch_list.cgi. The script will return a table which lists your defined directory and a list of available files.
<!--#exec cgi="/cgi-bin/fetch_list.cgi" -->
-
My links in the Public form are showing my server path, why?
This is because the script could not correctly resolve the URL to the files. You can correct this by editing the fetch_key.cgi file and adding the extraneous path to the $DefaultHTML variable. What you enter will be removed from the URL displayed on your file listing.
-
Can I add create my own form with extra fields?
Yes, you can do this by viewing the source code generated by the fetch.cgi script. Copy it to your own HTML document. If you're on a Unix/Linux server or any server that lets you use SSI, you can then use an SSI tag to generate the list on the fly. E.g.
<!--#exec cgi="/cgi-bin/fetch_list.cgi" -->
If your server does not support SSI tags, you can still create your own form, however the list of files will need to be updated by hand if it changes.
In your custom HTML document, add as many form fields as you like, then add them as markers in the Admin notification template in the Admin Settings. E.g. in
your form, you might add :
<input type="text" name="Age">
then in your notification template you'd use :
Customer's Age : %%%Age%%%
You may add as many fields as you like.
|
|
|