GUID.org

GUID.org Usage

This page will show you how to include the proper HTML in your pages to retrieve the GUID. You will also need to install a small CGI program or server module to receive the GUIDs that GUID.org sends to you.

For a quick start, grab this test page and follow the instructions.

To have GUID.org send a user's GUID, you simply need to include HTML in your page that looks like this:

<!-- Standard code for requesting a GUID from www.guid.org -->
<script language=Javascript><!-- // check for GUID before requesting it
i=document.cookie.indexOf("GUID="); if (i == null || i == -1)
document.write("<img height=1 width=1 src=\"http://www.guid.org/send-guid?Redirect=http:%2F%2Fwww.mysite.com/setguid.cgi\">")
// --></script><noscript><!-- This part for non-JS browsers -->
<img height=1 width=1 src="http://www.guid.org/send-guid?Redirect=http:%2F%2Fwww.mysite.com/setguid.cgi"></noscript>

You must edit the "Redirect" parameter in both places to point to your GUID receiver. See below for sample GUID receivers. The "%2F%2F" is used in place of the double slash because brain-dead MSIE browsers change double slashes into single slashes, breaking the redirect URL.

The Javascript in the HTML is designed to reduce GUID.org traffic, and Internet traffic in general, by only requesting the GUID from GUID.org if the site has not already recorded it. It has been tested on many browsers, and the tag will continue to work even if the browser does not support Javascript. Of course, a better solution would be to have the server check to see if the GUID is set, and only put the IMG tag in if there isn't one, but it's server (and sometimes site) dependent, so we don't provide code for that here.

The request to "send-guid" causes GUID.org to respond with a redirect to your receiver script, with an URL that looks like this:

Location: http://www.mysite.com/setguid.cgi?GUID=0123456789ABCDEF0123456789ABCDEF

Here are some example receiver programs, you are of course welcome to write your own. Contributions to this page are also welcome.

Once you have installed the receiver, we recommend using this test page to ensure your setup is working.

Return home.