?
Solved

CGI- Auto Hyperlinking to Folders/files

Posted on 2003-03-01
7
Medium Priority
?
206 Views
Last Modified: 2013-12-25
I have searched all over. can you help.
I have a site. with about 3000 files I need to hyperlink to. and I am constantaly updating and adding files to the folders. what I want to know is there a script that can call up the folders and automagically create the appropiate hyperlink. (it would be nice to also add , how many times it had been d/l too).
so when they go to example. themes. the themes html will check the folder and show a list of the contents for that folder (example 30 tones, listed by what they are saved as) for the user to download by just click on the link/name. and if its over example 30 itmes it allows for the user to go to page 2..3 etc.

I know it asking alot. but with over 3000 tones to index. its a pain. my old site. www.caferock.co.uk. was not too bad. but my new one has tripple the items.

www.mobelee.co.uk

Please help.. many thanks.
0
Comment
Question by:batman1056
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
7 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 8049189
why not using a simple directoy indexing which is done by the server
0
 

Author Comment

by:batman1056
ID: 8051252
thought about that but that will allow peeps to link to them and steel my bandwidth. cgi , would prevent this.

thanks
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 8053074
then things get complicated ...
I'd suggest that you create static files when the browser accesses first time.
Anything else requires some kind of session management (or an application server).

Just think of following real scenarion:
  1. browser comes first time
     -> your cgi generates first page with 20 links
  2. browser comes again with the "next page" link but a few minutes later
     -> meanwhile the first 20 files have been changed
  3. browser comes again with sam URL as in 1. but a few hours/days/weeks later..
what should happen in case 2. and 3. ?
0
 
LVL 2

Assisted Solution

by:Itatsumaki
Itatsumaki earned 500 total points
ID: 8074113
Well, you could:
1. Keep a usage file in each directory (giving #/downloads)
2. Recurse the directories dynamically as need be.  Big time hit on your server's IO, but isn't impossible.

You would open a directory handle and display that.  You'd just pass the dir name as a (hidden) parameter in the script.

I don't like this approach one bit (since it gives away your directory structure for free) but it should do what you want....
0
 

Author Comment

by:batman1056
ID: 8078252
got it sorted. and its great. very easy to configure and autoupdates everthing. considering I have over 3000 files its great. PLUS got a proggy which can autoupdate ALL the folders at once with any updates.

thanks
www.mobelee.co.uk
tones section
user ruth
pass ruth

check it out many thanks
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question