Return to Snippet

Revision: 12997
at April 3, 2009 15:13 by jdstraughan


Initial Code
function digg_url($longurl) 
{
	$simple = shell_exec('curl http://services.digg.com/url/short/create?url='. urlencode($longurl));
	$p = xml_parser_create();
	xml_parse_into_struct($p, $simple, $vals, $index);
	xml_parser_free($p);
	return $vals[1]['attributes']['SHORT_URL'];
}

Initial URL


Initial Description
This function will convert any long url into a Diggbar url

Initial Title
Create Digg Url with PHP

Initial Tags
php

Initial Language
PHP