CodeCanyon

Advanced PHP Protection

  • Has been a member for 4-5 years
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • United States
  • Referred between 1 and 9 users
emberstudio says

Is there a timed session option with this? I need this for a client site and I need limited logged-in sessions. Before I purchase this I just wanted to know if this is a configurable option with this product, where I can have login sessions time-out or just force the user to be logged out upon browser window close.

1 year ago
Author
betterphp betterphp replied

this does not provide that functionality, but it can be done with one line of code

ini_set("session.gc_maxlifetime", 3600); 

3600 should be the number of seconds the session will last for

1 year ago
  • Has been a member for 3-4 years
  • Bought between 1 and 9 items
thomaspalmer says
Purchased

I just purchased Advanced PHP Protection and was wondering where the code for the time out go as described in the previous comment?

I also do not see how to allow multiple users in the code. How do I enable this for MySQL?

9 months ago
Author
betterphp betterphp replied

The timeout code needs to go anywhere before the session is started, so just put it at the very top of the file.

A basic example of MySQL integration is in the documentation, it’s not really a feature of this item so there is not thing to enable exactly.

9 months ago
Purchased
Default-user thomaspalmer replied

You are indeed correct about the example in the documentation. I’m sorry that I missed it before initially posting about it. I look forward to using your code!

9 months ago
Author
betterphp betterphp replied

This of this as a way to prompt the user for a password and check it against the one you pass to the function, so all you need to do is give it the username and password form the database and it should work.

9 months ago
  • Has been a member for 3-4 years
  • Bought between 1 and 9 items
thomaspalmer says
Purchased

In the example.php file, I think you should change this line of code:

header('Location: example.php');

to this:

header('Location: ' . $_SERVER['PHP_SELF']);

so that no matter what the end user changes the php file name to, the code will still work.

Otherwise great script. 5 stars from me!

9 months ago
  • Has been a member for 1-2 years
  • Bought between 50 and 99 items
jgoch101 says

Can this be set to a folder with php files inside, or do I actually have to put the code on each individual php file.

7 months ago
Author
betterphp betterphp replied

You have to have this code added to the files in the folder in some way. If you need to protect all of the files you could try using a auto_prepend_file.

7 months ago
  • Has been a member for 1-2 years
  • Bought between 50 and 99 items
  • Australia
bigadz says
Purchased

Hi,

I am using this plugin in single line mode.

What would be the code to logout?

For example; <a href="logout();">Logout</a> ?

Cheers.

7 months ago
Author
betterphp betterphp replied

You would have to call the logout method

security::logout();

This would have to be done from php not in a href of a link.

7 months ago
  • Has been a member for 2-3 years
  • Bought between 50 and 99 items
FBecht says

Hi BetterPHP,

Is it possible to have multiple users with redirects? I have a site I want to post sites in progress on. The main page could have a button list or such so the customer could click on it, be prompted for password, then be passed along to the demo site. Or, could a password screen be all that’s on the main page, and redirect customers based upon password? Need some guidance.

Thank you.

5 months ago
Author
betterphp betterphp replied

This would be able to do only the password part, the rest would have to be done with your own code.

You could also have the main page with no protection and then use this item to protect each site separately which would give you the same effect but might be a little easier.

5 months ago
  • Has been a member for 1-2 years
  • Bought between 50 and 99 items
falarcon says
Purchased

Thanks..

How to protect the my index.php in admin folder…...?

5 months ago
Author
betterphp betterphp replied

include the file in it ?

5 months ago
  • Has been a member for 4-5 years
  • Bought between 100 and 499 items
vsdesigner says
Purchased

Nice work, 10 seconds to set 5 stars

;)

VSdesigner

4 months ago
Author
betterphp betterphp replied

:D

4 months ago
by
by
by
by
by