Over the years I’ve used many different hosting solutions. From shared hosting, a dedicated server, to several VPSes. These all came with a graphical control panel, most often Plesk, from which the server could be administered. The downside was the cost of the licence. So a little while ago I took the plunge and purchased …
When fighting spammers or other unwanted traffic it’s useful to be able to block a top level domain, such as ukhost4u.com or uk2.net. This needs to be extracted from the full hostname, which might be something like 123-456-789-10.ukhost4u.com. To do that you’ll need a combination of a PHP built-in function and a regular expression.
Want to block email from specific countries? Want to check a visitor’s country within your PHP script? It’s all quite easy using this free IP-to-country DNS mapping service!
Sending email using PHP on a Windows IIS server is not as simple as it is when using a Linux server.
The preg_match() function will perform a Perl-compatible regular expression pattern match. Sometimes you will want to match a backslash, but it’s not as straightforward as you might first think!