WordPress Unique Machine IDs

Following Philip Thrasher’s great information on Generating Unique Machine IDs under Mac OS X, Windows, and Linux, I’d like to share a method that WordPress developers will find very useful. For plug-ins, themes, or applications working with WordPress, check this out: you can uniquely identify the online blog using the WordPress option “siteurl”. This code will grab it:

<?php
    $machine_id = get_option('siteurl');
?>

Even though this is a simple and in-my-opinion reliable method for WordPress unique machine IDs, this of course has its pros and cons. Mainly, there’s the risk of a user spoofing their “siteurl”. But for this to happen, first the hacker will have to know that a machine ID is being generated in the first place for the sake of licensing. THEN the hacker needs to know that the “siteurl” is being used as the machine ID. But why would someone do this? To install the same plugin on multiple sites when they only have a single-site license.

So after altering their WordPress database to reflect the same “siteurl” as another machine ID that they some-how-know will be accepted by Serial Sense (highly unlikely) … then the hacker has to also hack at WordPress so that the WP option “siteurl” is ignored and the actual site’s URL is correctly applied else where.

For WordPress plug-ins, themes, etc. I would prefer to just use the WP option “siteurl” in order to get a unique machine ID. It’s simple and would take an experienced hacker MANY hours to accomplish this effectively. And those hours are simply just not worth it to your real customers who would gladly purchase your software before taking on this exhausting task.

This entry was posted in Implementation, Support. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

This site is using OpenAvatar based on