开发者

Create filehosting site for registered members [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Restrict file access to authorized php users

I have some concept for a filehosting site ... LIke suppose the file i开发者_JAVA技巧s http://abcd.com/xyz/ABCDEF.pdf

then the user who has logged in can only download, and should not be accessible to others ..and there should be a log in which the user who downloaded has his/her username in it ...

the thing is I am stuck how to prevent the user from direct downloading ...and i want to implement the major portion of already filehosting sites ..but stuck on where to Begin that concept with ...


You can put your files in c:\FILES

No one can direct download them

Create download.php

//EXAMPLE
if(($_POST['username'])&&($_POST['password'])) //are correct?
{
     //echo the file with proper header
}


you should remember that ABCDEF.pdf is just a webpage on other major filesharing sites. that webpage accesses the databases and check for users, session, limits, real file location and other setting they may need.

start in uploading in a location other than website, /var/www/files or /storage/ you can have multiple boxes to keep your files - multiple boxes are used for load balancing.

when an user accesses that webpage if he is logged in and can access that page the "streaming" should start immediately, otherwise throw error or login options.

this is my idea in a file sharing site.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜