WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : How to create a file with any number of UniqIDs (GUIDs)
Categories : PHP, Security
Boaz Yahav
Date : Mar 10th 2003
Grade : 3 of 5 (graded 1 times)
Viewed : 3695
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Boaz Yahav
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

UniqIDs are very helpful with many security related issues.
They are used as keys you can give to users for future use, for user identification and any use
where you can't allow a user to be able to guess another user's ID. You can see how unique is the
uniqid here : http://www.weberdev.com/get_example.php3?count=296.

Use this to run the code from command prompt :

#!/usr/local/bin/php -q
<?
$NumberOfIDsToCreate=4;
set_time_limit(0);
$fp=fopen("IDs.txt","w");
for($i=1 ; $i <= $NumberOfIDsToCreate ; $i++) {
        $ID=md5(uniqid(rand()));
        fputs($fp,"$ID\n",1024);
}
fclose($fp);
?>

An example of this script output looks like :

2ae2d4b4794729bd81d9c5baef092e55
b48d7a0c25c106d875acdbd59061743a
c83ea01289b3ac9edc2f65a5efb20da4
b23e1eacad27d0d44e09388d5af76846



A damaged image generator (class) for validating text. CAPTCHA - Completely Automated Public Turing test to tell Computers and Humans Apart
Categories : PHP, PHP Classes, Security, GD image library, Security
Function to generate readable/remeberable random password
Categories : PHP, Security, Security
Securing Web Forms with Simple PHP-CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart)
Categories : PHP, Security, GD image library, Sessions
IP Blocking
Categories : PHP, Security, HTTP
Dynamic Image Authentication System in Signup Pages (CAPTCHA)
Categories : PHP, Security, GD image library
Secure Login
Categories : PHP, MySQL, Cookies, Security
Anti SQL injection-PHP
Categories : PHP, MySQL, Security
Passgen: Automatically generate mixed case alpha numeric passwords
Categories : PHP, Security
A PHP function to encrypt and decrypt a number or string or a combination of the two.
Categories : PHP, Encryption, Security
Generate image with random number (CAPTCHA)
Categories : PHP, GD image library, Graphics, Security
Forms protected from XSS attacks (FOPAXSS)
Categories : PHP, PHP Classes, Form Processing, Security
Form Security - Match A Value For Success
Categories : PHP, Authentication, HTML and PHP, Sessions, Security
A Simple Script that stores encrypted messages in databases
Categories : PHP, Databases, MySQL, Security
phpSecurePages is a PHP module to secures pages with a loginname and password. It handles multiple user groups (each has own viewing rights), store data in a MySQL database or a configuration file, and can be used to identify Web site viewers.
Categories : PHP, Security, Authentication
Protect your email links from being spidered by spam email robots!
Categories : PHP, Security, Mail, Email