christophdb supports this item


This author's response time can be up to 2 business days.

48 comments found.

I have the same problem like the User “fsoda”

what should I do or say to my domain hoster to make the script run? Many thanks for the Support

I have also tested your script “test_fileprotect.php” and it works but not the login. :( Could i change something in the Code? The Link to the Domainfolder is: /intern/ ( admin / 12345 ) Here is your script:

Hi C-dot-media, the script should work. Can you send me the source code of the login.php? Otherwise we can make a teamviewer session and we can look together at the code. My Skype name is “christophdb”.

Very nice script. Still very up to date. I changed it to be responsive with bootstrap. This is my suggestion to you – coder – as well. The CSS looks like the 18th century but the script is up to date.

I think many more would buy if you changed it to be responsive.

I give the script 5 stars though.

Hi johannez, thanks for the comment. You are right. File Protect is not responsive. Time in life is just so limited. :-) No kidding. I will update if I find the time… Best regards Christoph

Great script. Quick question, and I believe there are more people interested in this.

Example: I offer free downloadable files. The visitor clicks on the download button and links to:

The visitor gets redirected to login.php before getting the download - got the above part working… -

Now, after login, how can I set a cookie or anything that instead of redirecting to index.php, the visitor gets a redirect to in the protected folder (the original destination file).

Would that be possible? If not, can i echo/output the original download link in the index.file (using the cookie we set for example)?

Hope you help me out :)

Hi zijlstravideo, there is the possiblity to define the target after the login. You can do that with $fp->SetTarget(‘’). But I assume that this will not work, because it is not a php file and then the user will be redirected back to login…

So you have to find another way. I see the following ways: 1) you have different logins per file. So use a database like mysql and use the “optional” field to define the target file. This optional value can be access with $_SESSION[‘user_rights’]; and can be used on your custom index.php.

2) build a php downoad-page: instead of downloading file with direct access, create a file like download.php?target=xyz… On this page you can include fileprotect.

Best regards Christoph


I freshly purchased File Protect that seems simple to implement. However I don’t understand in which file (and where in the file) to set up a password prior or after uploading the source file in the folder to be protected.

Can you give me directions please ?


Hi Keepshango, you can define the username and password in the “login.php”. In this file there are different possibilities how the authentification could be done.

easiest way would be to remove the comment before: $fp->SingleAccount(‘ionas’,’admin01’); and then change username and password in anything you like.

That is all. Best regards Christoph

where is the log out button?

I have this error: Warning: Creating default object from empty value in and also this one: Warning: Cannot modify header information – headers already sent by (output started at /home/... /fileprotect/fileprotect.php

Hi mxwealth, the codesnippet from fileprotect has to be pasted directly at the beginning of the php page.

The error message tells you that there is an output (so some text or content) that is processes before file protect is processes.

Move the four lines at the beginning of your code and file protect will work like a charm. Best regards Christoph

Pre-purchase question: Can Each Client ( 90 clients) can have their own Individual /unique log-in password?

Hi Stephen, yeah this is definitely possible. In your case you will need a mysql-database with all the username and password combinations (and if you like a salt). Then fileprotect takes care of the login.

Please have a look at This is a project where I use fileprotect to check for the login. You can register on and see how it feels.

Best regards Christoph

Pre-purchase question: Can Each Client ( 90 clients) can have their own Individual /unique log-in password?

just replied you other question some seconds ago…

Can it protect hotlink video files and allow only certain Ips to hotlink them to stream?

Hi GreenPeace, I assume fileprotect is not the right tool for you. Fileprotect is mainly for php files. Best regards Christoph