Social Bookmarking Submission Code
Social bookmarking tools such as Digg and del.icio.us can be seen as the latest tools to drive traffic to a website and to provide important links (Read more About Social Bookmarks). These services allow varying degrees of automated submissions, and so this page was created to give you the required code to add to your pages to facilitate submission.
Digg submission code
Digg does not allow complete automated submission, requiring some human interaction. There are two versions of the code: PHP and Javascript.
PHP Digg code
Using PHP, you can create the 'Digg this' link on the server before sending the page to the browser. The code is (all one line):
<a href="http://digg.com/submit?phase=2&url=<?php echo urlencode("http://ekstreme.com" . $_SERVER["REQUEST_URI"]); ?>">Digg this</a>
This produces this link: Digg this.
Of course, don't forget to change the http://ekstreme.com to your domain name!.
Javascript Digg code
The Javascript Digg code was first released by Weston Campbell. You can use it as a bookmarklet: just drag the link to your bookmark toolbar. A simplified version of the code is:
<a href="javascript:location.href='http://digg.com/submit?phase=2&url='+encodeURIComponent(document.location.href)+' '">Digg this</a>
This produces this link: Digg this.
del.icio.us submission code
del.icio.us is a very popular social bookmarking service. Its link submission system is similar to Digg's. Again, we have PHP and Javscript codes.
del.icio.us PHP submission code
The PHP code to submit to del.icio.us is:
<a href="http://del.icio.us/post?v=2&url=<?php echo urlencode("http://ekstreme.com" . $_SERVER["REQUEST_URI"]); ?>&title=<?php echo urlencode($PAGE_TITLE);?>" title="Post to del.icio.us">Post page to del.icio.us</a>
This produces this link: Post page to del.icio.us
Note the $PAGE_TITLE variable. This needs to be changed to the page's actual title. If you are using blog software or a content management system (CMS), you might find that this variable is already present, but called something else. If not, you can submit the page without a title, but this forces the user to type it in. In this case, the code will be:
<a href="http://del.icio.us/post?v=2&url=<?php echo urlencode("http://ekstreme.com" . $_SERVER["REQUEST_URI"]); ?>" title="Post to del.icio.us">Post page to del.icio.us</a>
Which produces this link: Post page to del.icio.us. Notice the difference?
Again, change ekstreme.com to your domain name!
del.icio.us Javascript submission code
The Javascript code is more straightforward:
<a href="javascript:location.href='http://del.icio.us/post?v=2&url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title)+' '">Post to del.icio.us</a>
Output: Post to del.icio.us.
Furl posting code
The Furl submission code is similar to the del.icio.us code above.
Furl PHP code
The code:
<a href="http://www.furl.net/storeIt.jsp?t=<?php echo urlencode($PAGE_TITLE);?>&u=<?php echo urlencode("http://ekstreme.com" . $_SERVER["REQUEST_URI"]); ?>">Post page to Furl</a>
Which produces: Post page to Furl
Again, notice the $PAGE_TITLE variable. Unlike using the del.icio.us, if you do not provide a link title, Furl automatically sets it to 'untitled'. You may want to avoid that
Furl Javascript code
The code:
<a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&t='+encodeURIComponent(document.title)+' '">Post to Furl</a>
Which produces: Post to Furl.
Netscape.com
Recently (in 2006), Netscape.com introduced a Digg-like interface for its homepage, along with submission URLs.
Netscape.com PHP code
The code:
<a href="http://www.netscape.com/submit/?T=<?php echo urlencode($PAGE_TITLE);?>&U=<?php echo urlencode("http://ekstreme.com" . $_SERVER["REQUEST_URI"]); ?>">Add this page to Netscape.com</a>
Which produces: Add this page to Netscape.com.
Netscape.com Javascript code
The code:
<a href="javascript:location.href='http://www.netscape.com/submit/?U='+encodeURIComponent(document.location.href)+'&T='+encodeURIComponent(document.title)+' '">Post to Netscape.com</a>
Which produces: Post to Netscape.com.
Social bookmarking bookmarklets
What a mouthful: 'bookmarking bookmarklets', but you can use the Javascript links provided above as bookmarklets. Simply drag them to your favorites/bookmarks toolbar, thus creating a set of buttons. Now as you are browsing, any web page you vist, you can quickly send to the social bookmarking services by simply clicking the bookmarklet buttons.
For your convenience, here are the bookmarklets again:
If you can contribute more code for other services, please contact me. Thanks!
