Latest Articles

Use the navigation at the bottom to see older articles

How to send an email in PHP

Many complex things are extremely simple in PHP – sending mail is one of them. Here’s how: // components for our email $recepients = ‘you@somewhere.com’; $subject = ‘Hello from PHP’; $message = ‘This is a test mail.’; // let’s send it $success = mail($recepients, $subject, $message); if ($success) { echo ‘Mail added to outbox’; } … Read more

How to test if a Shell Command can be executed in PHP

Before we execute a shell command from PHP it’s a good idea to test if the server will respond to it. We can do this by making use of the empty() function. The following example consists of a helper function you can call before executing the command in question. Then we call it with the … Read more

How to share your posts on Google Plus publicly via JetPack

I’ve decided to start using Google Plus more in 2014. Thanks to JetPack 2.7 it’s a breeze to publish my posts on Google Plus without having to share them manually. What I’ve noticed though was that by default all my posts were appearing as “privately shared” only. As I’d like the widest audience possible I … Read more