How can I detect iFrame using PHP

How to detect this is a iframe or not, using php.You can check the referrer to determine if a request came from a another page on your own site or from a third-party site, or if it was direct traffic.So $_SERVER[‘HTTP_REFERER’] can be use to this.
As noted this method is not foolproof, but may provide more information than your application currently receives.
Continue reading How can I detect iFrame using PHP

PHP check a random string if it exists and create a new one

How to create random string and check if it exists form database , if it does create a new one using php.You can use php time() function to create random string and convert it using md5() function.


How to call to this function to get value.

Note:exists_in_db() is a function.You must write this function after getting parameter and it check in the database and return value.