Updating mysql code to mysqli in PHP

There are a few different ways of accessing MySQL from PHP. Historically the mysql extension was the only way until PHP 5.0 (circa 2004). After that mysqli appeared, which is an improved version of the older mysql driver. And also PDO, which gives you an abstraction layer for different databases. Unfortunately there’s still a lot […]

Read More

Using the Google Site Verification API in PHP

I wasn’t able to find any tutorial or guide on how to programmatically verify a site for Google, server-side from PHP. What follows is my attempt at doing it. You have to install “Google APIs Client Library for PHP”, available at https://github.com/google/google-api-php-client. I recommend reading the Google documentation on Google Site Verification API from https://developers.google.com/site-verification/v1/getting_started […]

Read More