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

create pdf by using javascript

yii framework simple shopping cart tutorial for beginners

yii2 arrayhelper::map vs array_map