• 2011-03-07
  •   PHP

Digg

Creating a Digg submission link in PHP is easy since all the parameters Digg expects are included in the URL. Digg like most other social bookmarking tools does not allow complete automation of submissions. It requires the visitor to manually click the submit button to prevent spamming.

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

<a href="http://digg.com/submit?phase=2&url=<?php echo $current_url; ?>">Digg this!</a>