Geocaching and Waymarking Stats Bar Redirector
Geocaching.com has a nice Stats Bar which you can put on your own web page to show your geocaching statistics. They even give you a form where you can create your own Stats Bar.
The problem is, the Stat Bar it creates is a "dynamic" image, and some web hosts, such as MySpace and the Groundspeak forums, don't let you show dynamic images. With the form below, we can fake those websites into thinking it's a "static" image.
Your Geocaching/Waymarking username:
(This is used in the hover text, not within the image itself.)
Your GUID:
(If you don't know what a GUID is, you can generate the html on geocaching.com or waymarking.com and copy and paste it into this box.)
Your image:
(Only applies to geocaching stat bar.)
Text to display beneath your hides/finds:
(Only applies to geocaching stat bar.)
Copy and paste the html below for your web site to display your stat bar:
How It Works
This works by modifying the URL of the image to look like a static image instead of a dynamic image. You can recognize a dynamic image by the question mark in the middle of the URL, as well as the equals signs and ampersands after the question mark. A static image has none of those. It just looks like a regular path to a .jpg image.
The URL for a geocaching Stat Bar is:
http://img.geocaching.com/stats/img.aspx?uid=59af9...cb3&txt=Lil+Devil+Rocks
The form above creates a URL that looks like:
http://www.lildevil.org/stats/gc/59af9...cb3/Lil+Devil+Rocks.jpg
I wrote a few lines of code to put on my server (in the .htaccess) file which will take such a static URL and rewrite it to a dynamic URL on geocaching.com.
You can use this static URL on your website or forum message, and when a browser asks my server for the image, my server replies with "sorry, it's not here, try over there" and returns the dynamic URL. The browser will then ask img.geocaching.com for the image and display it. All this without anyone even realizing what is happening.
Format Details
The exact format of the URL that my server recognizes is:
http://www.lildevil.org/stats/gc/your guid/image number/text to display.jpgyour guid is that 36 character alpha-numeric string attached to your profile.
image number is 1 (one) for the geocaching logo, or 2 (two) for Signal the Frog. This part is optional and will default to the geocaching logo.
text to display is the text you want to show beneath your hides and finds. Use plus signs in place of spaces.
It must end with .jpg or .png
Feel free to use this as much as you want. There's very little bandwidth impact on my server, as I'm not serving the images, just redirecting the URL.
Version History
| February, 2007 | First release. |
| August 1, 2007 | Added form to parse the guid and other variables out of the html generated by geocaching.com. |
| August 24, 2008 | Added support for Waymarking stat bar and added /gc/ to the Geocaching URL for better clarification. Old URLs without /gc/ will continue to be supported. |
| September 4, 2008 | Fixed code to remove extra quote in image URLs. |
thanks!
i'm new to geocaching. thanks for this post! really helpful for me. if you have time, please visit my site at http://www.mygeocachenation.com/.

does it update?
Hi, thank you for publishing that feature, it is great.
Does it update when i log e.g. a found?
Thanks a lot,
greets from Germany,
Martin [GC: Martin89]