Just a little howto for those of you who would like to add a nice Add to blogmarks.net link to the articles published on their blog (or anything else).

The URL for the service is : http://blogmarks.net/my/new.php

Just throw a GET request to this URL, with the following parameters :

  • title : Title of the mark
  • url : URL of the ressource
  • summary : Description of the ressource
  • via : Referer
  • tags : a list of tags, separated by spaces

title and summary are mandatory.

title, summary and tags needs to be utf8 encoded, then urlencoded :

<?php $var = urlencode( utf8_encode($raw_var) ); ?>

BONUS :

Here is a javascript snippet to capture text highlited by user (we use it to fill in the summary in the bookmarklet) :

   var q='';
   if (window.getSelection) { q=window.getSelection(); } 
   else if (document.getSelection) { q=document.getSelection(); } 
   else if (document.selection) { q=document.selection.createRange().text; }

Easy ! What are you waiting for ??!