Block Disposable email domains from signing-up (PHP)
It is really annoying to know that half of your users’ emails getting bounced because these sneaky users used some disposable email address to register on your site. Yes, it happens a lot, the only way to stop this from happening again is to block them from ever using those phony emails again.
Get only domain name from email using PHP
Sometimes you need to extract domain name from email using PHP for whatever reason, in that case you can use code below :
$email = "[email protected]";
$domain_name = substr(strrchr($email, "@"), 1);
echo "Domain name is :" . $domain_name;
Create New Widget in WordPress
Sometimes we need to create a widget in WordPress Template, to create a new widget just drop this line in your theme function.php file, and make changes as required.
Image Upload and Re-size PHP
Sometimes you need to upload and resize image files using PHP, and here you will find the simplest PHP snippet that takes care of your uploaded image files. This snippet should work as it is, but there are several other methods you can combine with it to create a proper functional image uploader, for example you can take a look at Ajax and PHP based image uploader here.