Two Google Analytics to Track Too

Here is a sample code of how to send data to two different Google Analytics accounts and not have it be sending twice to the same account. <script> (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject']=r;i[r]=i[r]||function(){...

Unwanted Characters in XML handling in php

So I ran into an issue where there was unwanted characters where spaces where suppose to be or nothing at all.  Here is a sample of those characters.  †“ Here is the fix that I implemented and it cleaned up the code right away. echo “<META...

WordPress Databases – Using dbDelta

There are plenty of times you need to create extra database tables for storing data within WordPress.  Sometimes a scope of an addon has changed and you need to modify the table.  Using dbDelta within WordPress can allow you to modify the table without having to use...

WordPress Plugin Header Requirements

Here is the code sample of what is required for developing a plugin.  This needs to go into the main php file within the plugin folder. <?php /* Plugin Name: WordPress.org Plugin Plugin URI: https://developer.wordpress.org/plugins/the-basics/ Description: Basic...

Whois Query PHP Function

function whois_query($domain) { // fix the domain name: $domain = strtolower(trim($domain)); $domain = preg_replace(‘/^http:\/\//i', ”, $domain); $domain = preg_replace(‘/^www\./i', ”, $domain); $domain = explode(‘/', $domain); $domain =...