AgeLock – Age Validation PHP Script



Version 1.6

AgeLock is an easy to use PHP script that can protect your websites PHP pages by intercepting a users and displaying a webpage asking them to either enter there date of birth, or click a button confirming that they are the correct age to access your sites content. Great for various types of websites; child only sites, alcohol related sites, gambling related sites, and adult content sites.
View full documentation and features at

AgeLock Features

  • Easy installation
  • No database required
  • Great for child only sites
  • Great for adult only sites: Gambling, Smoking, Alcohol, Vaping etc…
  • Set cookie to expire in days, hours, or on browser shutdown
  • Clear documented source code
  • SEO friendly
  • Responsive themes – great for mobile users!
  • Optional page redirection
  • Optional term and conditions section
  • Protects PHP pages

Great for child only and adult only websites
With AgeLock you are able to block users by setting minimum and/or maximum age limits on your sites users.

Easy installation
Just copy the AgeLock folder to your website and follow the simple instructions in the documentation provided.

SEO Friendly
AgeLock allows search engines/Social Networks like Google, Bing, Yahoo, Ask, Facebook, Twitter, Pinterest etc… to access your sites content without being intercepted. You can also allow certain IP addresses through without being blocked by AgeLock.

Responsive themes
AgeLock includes 14 themes and uses Twitters Bootstrap to enable responsive design which is great for mobile and tablet users.

AgeLock can either redirect the user to the original page that they intended to access, or to a page on your site that you can set.

Two verification methods

  1. Simple Yes/No buttons
  2. Dropdown date selector.

Easily switch date formats to whatever you wish; 28 Feb 2014, Feb 28 2014, 28 February 2014.

For support please email through the profile link on the right or through the comments.

If you use this script on your site please consider contacting us and we will provide a link to your site as an example.

Works with Various Content Management Systems
Known to work with: WordPress, Joomla, Prestashop, Zen Cart, OpenCart, and Magento.

Change Log.

Version 1.6
New Feature: cookie_domain. allows cookies to be set across subdomains.
Improved list of bots that are not redirected for age verification
Improved handling of HTTPS connections
Improved: debugger
Version 1.5
New Feature: cookie_mode. Replaces ‘standard cookie mode’
New Feature: Quick settings checker/debugger
Version 1.4
* New Feature: Standard Cookie Mode
Version 1.3
* New Feature: Joomla Support
Version 1.2
* New Feature: Character encoding option
* Bug Fix: ‘expire_session_in_hours’ expiry time was being incorrectly calculated.
* Improved PHP code.
Version 1.1
* New Feature: 12 additional themes
* New Feature: redirect to URL on failure option
* Bug Fix: ‘continue browsing’ mode dramatically improved
* Updated documentation: Includes instructions for OpenCart install



Please enter your comment!
Please enter your name here