There is one piece missing from all of these efforts thus far. It is frustrating me to no end. As far as I can tell, it is difficult, at best, to determine whether a given link has been submitted to Digg already. So, if you are programming some system and want to provide links to submit items or Digg items, you are incapable of determining which tool to provide the user.

Digg’s official policy at this point is to push all the users to the same place and let the submit form on their site sort things out. That’s what their Tools site has to say about it. For most developers, I imagine this is less than desirable. It is much better to be able to show the Digg button for those items already in the Digg system and let your users update that Digg without leaving your site.

The Holy Grail of the Digg API at this early stage then is letting developers dynamically determine the state of any given URL in the Digg system and present their users with a way to easily add a Digg to that URL or to submit that URL to the Digg system with a minimum of fuss.

One WordPress plugin developer seems to have done just that. I do not run a WordPress install and cannot test his work. I have spent the better part of the day trying to adapt it to work outside of WordPress with little luck. His curl and scrape method seems fragile and is certainly prone to slowness.

Does anyone have any thoughts or ideas about how this can be implemented in PHP? I have some code, but it’s based on the plugin above and I am not comfortable with the HTML scrape.

To the contrary, Ankur, those very curl and scrape methods are seemingly the only way to do it. I applaud you for that. That’s why I titled this the “Holy Grail.”
The problem with curl and scrape, as I see it, is that changes on Digg’s end can easily break the scrape regex (or the curl for that matter). Plus, if the site really starts to scale past a typical WordPress blog (for which your implementation was built) all of that curling makes for some serious waiting around.
Also, I see now that your link requires the detection of someone coming from digg.com before displaying the Digg button. What I am wanting to do would be to display that button (conditionally, based on whether the URL is in Digg) with the user never visiting Digg.

I see where you’re coming from, but I think you’ve misunderstood the structure of the code slightly.

The CURL / scrape function is NOT called every single time, and the Digg button is displayed whether the referring site is Digg or not. The user never has to visit Digg for this plugin to work. Only one referral from the Digg page is needed for the plugin to save the information in the database, after which it displays the Digg Button regardless.

Yeah, I really stand corrected about the speed of the curl/scrape, but I still worry about the maintenance issue if Digg were to change their code. I’m thinking about this from a business site standpoint, not just a blog usage.

“Only one referral from the Digg page is needed for the plugin to save the information in the database, after which it displays the Digg Button regardless.”

Right, the Holy Grail, then is for the page to be able to query/scrape/telepathically mindmeld with Digg to determine the URL’s disposition on Digg from the post’s very first display.

It’s only a minor difference, but for purity’s sake, I want to make it happen. 🙂

“Right, the Holy Grail, then is for the page to be able to query/scrape/telepathically mindmeld with Digg to determine the URL’s disposition on Digg from the post’s very first display.”

Which is possible, but would need the script to check Digg every single time it’s viewed up until it gets Dugg. Possible, but definitely not as good for high-traffic sites unless everything you post gets Dugg. However, I do have an idea I’ll check out when I have time.

I admire you for your humility. Some people go out of their way to prove themselves right even if they know they’re wrong. Not that you’re exactly wrong; I’m going to have a crack at some of the things you mentioned in my spare time.

Willingness to learn will get you anywhere, and you can’t learn if you think you already know everything.

Anyway, I’m very impressed. Keep on adding to your knowledge and one day who knows where you’ll end up.