api key generator in php

This function is used to create api key randomly,which can be used as password or as an apikey in php.I used this function in slim framework api.
<?php
function generateApiKey() {
return md5(uniqid(rand(), true));
}
echo generateApiKey();
?>

Comments

Popular posts from this blog

Find pair of n numbers in php

php: nested if in select tag

yii framework simple shopping cart tutorial for beginners