I have seen many PHP developers still use rand() for generating security tokens/unique strings, mostly for generating validation strings such as Email validation etc rand() is a secuirty hazard and should never be used to generate a security token. However, there is another function mt_rand() which generates better random value. What if you want to
This is a php code snippet that I wrote for a website. Thought it might be useful for some one else as I was unable to find any API to check whether the given email address is a free one or not. There are thousands of websites provide free email address like Yahoo or Gmail.
I am not quite sure PHP has inbuilt function for this requirement. While I was coding script for PayPal integration, I had to notify PayPal for IPN url for acknowledging the payment. The IPN script was located elsewhere, ie, on another directory, so I used a custom function to get the current URL path and