Jump to content

Querystrings to connect to music files on website


hemustvthemes

Recommended Posts

You can either set up the webserver to not allow outside links to specific files, or you can check the referer to see if they are coming from another site. Do a search on ASP referer to see how to do that.

Link to comment
Share on other sites

Are you talking about the filename included in the querystring? What question do you have about that? The way that page works, the page that they link to probably records some statistics about the file, like how many times it's been downloaded or something, and then redirects the user to the file itself.

Link to comment
Share on other sites

They can either store the file information in some log file, and increment a counter or something like that, or it's probably easier to look it up in a database. They can look up a record in the database for that filename, and increment the counter on it or add a new record in a database that lists the user's IP, date and time, which file, etc. It's really your choice what you want to keep track of and how you want to do it. To redirect to the file, they can use response.redirect to send them to the appropriate file, that's probably the easiest way.

Link to comment
Share on other sites

I don't think there are any tutorials specifically about that. You will need to get the file name from the query string, do whatever you want to do with the database, if anything, like statistics, and then do a response.redirect to wherever the file is.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...