PHP Classes

PHP Secure ID: Generate record IDs that map to real DB record IDs

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 244 All time: 7,969 This week: 209Up
Version License PHP version Categories
secure-id 1.2Public Domain5.4PHP 5, Databases, Validation


This class can generate record IDs that map to real DB record IDs.

It can generate random ID values with number values that start with high values.

The class can check if the ID was already generated before and regenerate it if it is the case.

The class can associate the generated ID to a real ID used to identify real records.

Innovation Award
PHP Programming Innovation award nominee
May 2015
Number 3

Prize: One book of choice by Packt
Many sites use the sequential identifiers used in database records to pass references to information about those records in URLs of the site Web pages.

This fact may help people that scrape information from Web site pages because they can guess what is the next page URL by incrementing the identifier value used in a given page.

This class can generate IDs for records that map to real database records. This way a scraper cannot guess the real ID of a package, and so cannot guess the identifier of the next pages.

Manuel Lemos
Picture of Matthew Knowlton
  Performance   Level  
Name: Matthew Knowlton is available for providing paid consulting. Contact Matthew Knowlton .
Classes: 6 packages by
Country: United States United States
Age: 28
All time rank: 2039291 in United States United States
Week rank: 389 Up44 in United States United States Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x

  Files folder image Files  
File Role Description
Plain text file secure_ids.class.php Class Class Source
Accessible without login Plain text file secure_ids.example.php Example Example Script 1KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
Add Module PHP Trait Download .zip .tar.gz For allowing custom encryption method Required
 Version Control Unique User Downloads Download Rankings  
This week:0
All time:7,969
This week:209Up