PDA

View Full Version : Code's to call upon url links in the db that user can't see


Replicators
01-27-2006, 12:06 AM
The way i wanna do things on my forum is to have people upload html files as attachments that open automatically once they download it by use of mimetype. And inside the html they have links to files, but links would not be inside the html file. It would be in the forums database instead, allowing the link source to be hidden from user period. Now i know one of them ways to do that is to have the database act like a mirror for the file, in which to the user it would seem they are getting the file directly from your site. Is there a way to accomplish this without using the bandwidth of your forum server? Please anyone say if this is usefull too, as i could use something like this.

Also a person would need to be logged in and have the correct permissions to fetch the certain file. All i want to know is is this possible? And if so, could someone spend the time to build it?

Marco van Herwaarden
01-27-2006, 07:01 PM
To tell you the truth, i don't have a clue what you are talking about. Please try to explain a bit better. (sometimes less info is better)

harmor19
01-27-2006, 09:50 PM
I think what he means if you viewed the source you could see where the file is coming from.

Like on vbulletin the images have a field in the database that points to a directory on the server.

@Replicators
If this is what you mean then I would just use .htaccess in the folder where the files will be stored.

I'll try to find the .htaccess

not tested but try

Save file as .htaccess (nothing more, nothing less.)
IndexIgnore *

Replicators
01-28-2006, 05:55 AM
No, the way we do our downloads handling is have each file owner make their own html file and attach it to the forum. In the html file would be a code to call upon a link inside the forums database in which if a person clicked it it would mean they would have to be logged into the forums in order to retrieve that file. (to prevent off site linking) and also if at all possible to "Hide" the direct link source of that file in question.

harmor19
01-28-2006, 06:40 AM
I can't even comprehend that.

Let me try to understand this.
How can they make a link in an HTML file that calls the database?
Show me an example.

Replicators
01-28-2006, 07:55 AM
All i want to accomplish is using the attachments as archives for downloads. Now even if i put in a link to the forums which redirects to the actual file, but hides the direct file directory. This would be succeeding!

Like a hack that has a specific place, and you make a link that points to it for example (http://www.yoursite.com/forums/linx.php?l=11) which would call upon link number 11 that would have to be registered firsthand by the person who submits the link (Either by moderation or something) They would have to log in to the forums to get the link,and somehow hide the direct link source of the file which would prevent off-site linking. Is this possible?

Hellcat
01-28-2006, 09:20 AM
You could make a script that redirects via HTTP headers, that way the real location will not show up in any sourcecodes, but it's still possible to find out!

Another option would be a downloadscript that sends the file to the browser but does a refferer check before sending (and/or checks if the user is currently logged in to the forum) and it gets the files from a directory that's not accessible from the webserver.
Remotelinking is not possible that way - I'm using such a script on some of my own sites.

The above could be done with a simple .htaccess as well, but the script is more flexible :)

Replicators
01-28-2006, 07:22 PM
Could u by any chance make that mod then? I have nothing to give in return but it sure would make my day. Also giving the option to whether have it partially secure or fully secure. Just by a link you put into the forums where you would have to be logged in to get the file.

Hellcat
01-29-2006, 04:30 PM
There's a MOD floating around here called "EC Downloads" or such.
Maybe that also does what you need - if not I could release my script here, sure :)

Replicators
01-29-2006, 06:29 PM
The links and download manager does it, but i don't want to do it that way. As long as i can put links into txt or html files and have them point to a place to the forums which would make people login first and then get the files i would be most happy. And also hide the direct file source.