Jump to content

Querying Gc.com's Database


Kirok

Recommended Posts

I'd like to write some simple Perl and / or PHP scripts to query the GC database, so that I can show my latest finds on my website.

I could not find any posts regarding this, but I do see other sites using custom code to do similar things.

 

Can someone point me in the right direction?

 

TIA

Edited by IAmKirok
Link to comment

Sorry to disappoint you, but GC.com does not have an interface to query the DB.

Since they also outlaw spiders there's no way to get to your data.

 

Edit : well, you could probably use pocket queries.

I'd really like to see a simple XML interface like on some other cache listing sites.

Edited by ghazkull
Link to comment

Hmm. Again, interesting. I assume you are refering to section 5, titled "Access and Interference".

 

It does imply that "scrapes" are not permitted, unless express written premission has been provided. For all I know, it has (to the site I had refered to previously - link now deleted.).

 

I guess if I want to do it, I'll hvae to contact GC.com myself.

 

Thanks.

Link to comment

While the TOU indicates permission could be given in this message Elias says

On scraping or mining the site for data:

 

The official answer:

 

Even though the TOU says to contact us for permission, we don't give permission to scrape the site. Its not supported, and we don't want anyone doing it.

. Now he does admit that it goes on, but will be blocked if detected.
Link to comment

Bad choice of wording, but yes, I understand it is forbidden.

 

Suffice it to say I won't be attempting it, and as AllenLacy points out, I won't even bother asking.

 

They've made the Stat Bar accessible to everyone, so I'll post the question to them in the form of a new feature request.

What I'm simply looking for is a way to display names & links to the last 2 or 3 caches I've found at my website.

Sort-of of a "what have I been up to lately" kind of thing.

Can't hurt to ask.

 

Thanks for the responses.

Link to comment

I *think* that as long as you're linking back to the caches, and you page doesn't have any offensive content that you're fine. If all you want is your most recent 2 or 3, probably the easiest way to do this is manual. Just change the link(s) on your page after you've posted your find(s) for the day. After setting up the page the first time, it'd be a simple matter of deleting the old link(s) and doing a copy/paste for the new.

Link to comment
What I'm simply looking for is a way to display names & links to the last 2 or 3 caches I've found at my website.

Sort-of of a "what have I been up to lately" kind of thing.

Can't hurt to ask.

That's easy to do. Keep your own local database of the waypoint numbers of the caches you have found, in the order you found them. You can populate that database from pocket queries quite easily using Perl, requiring no scraping at all.

 

Then you can query the database for the most recently found caches and use the waypoint-name URL formulation to make a link from your local page to the cache page directly. No need to get to the site to figure out the cache's GUID.

 

The waypoint-based URL just looks like this:

 

http://www.geocaching.com/seek/cache_details.aspx?wp=GCxxxx

 

That's all you need.

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...