Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This php script provides a unique random key with 32 characters and can be used to avoid the system to pass some primary keys across the url, by example.
- function get_cripta()
- {
- $year = date('Y');
- $month = date('m');
- $day = date('d');
- $hour = date('H');
- $min = date('i');
- $sec = date('s');
- $coef = rand(1,99999);
- $quo1 = ($year*$month*$day);
- $quo2 = ($hour+$min+$sec);
- $result = ($quo1*$quo2)*$coef;
- $final = md5($result);
- return $final;
- }
Advertisement
Add Comment
Please, Sign In to add comment