• 2011-03-10
  •   PHP

Delicious

Creating a Delicious (del.icio.us) submission link is similar to Digg's, with the exception of the page title that can be sent to Delicious, which is not required, but you'll save the users from having to type it or copy/paste it.

If you are developing for a CMS (WordPress, Drupal, Joomla ...etc) you will find a variable containing the page title in its developer documentation. If you are not using a CMS the easiest way to get the page title is to place it in a PHP variable at the beginning of the page.

<?php
$current_url = urlencode('http://' . 
      $_SERVER['HTTP_HOST'] . $_SERVER["REQUEST_URI"]);
?>

Post page to del.icio.us