Prompted by an article by Andreas Gohr [splitbrain.com] giving a PHP function to get StumbleUpon rankings for a given URL I decided to revisit the SocialList Wordpress plugin I wrote in 2007 (I see someone else has taken the name for a different plugin now, guess that’s what I get for leaving it 2 years!)

Unfortunately Andreas mentioned that his method doesn’t work anymore as StumbleUpon have changed something. Well, I didn’t have anything better to do this evening, so I’ve reworked Andreas’ code and come up with a solution that works with the StumbleUpon changes.

View/download stumblecounts.php

This function should be pretty much a direct replacement for the one in the splitbrain.com article and the same instructions apply especially that to make it work you will need to set the two variables at top of the function.

Share or bookmark this post:
  • Digg
  • Reddit
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • description

Comments RSS

2 Comments

  1. Hi John,

    This is probably a very basic question, but how can I use this script once I host it somewhere (how to test a URL)?

    Thanks,

    - Joe

    #1 riomx
  2. Hi Joe,
    The script is used by including it in your PHP file and then doing something like:

    $results = stumblecounts("http://myurl.com");
    echo "StumbleUpon score for myurl.com is " . $results['score'];

    This will print out the score for the URL you specify.

    Hope that helps.

    #2 john

Leave a Comment