TRUE)); $domain = drupal_urlencode($domain); //$options = array( // 'query' => array('count' => 10, // 'appkey' => $appkey, // 'domain' => $domain, // 'type' => 'php', // 'sort' => 'digg_count-desc'), // 'absolute' => TRUE //); // ugly but calling url() twice does not work due to urlencodeing $query_string = '?count=10&sort=digg_count-desc&type=xml&appkey=' . $appkey . '&domain=' . $domain; $xml = diggthis_request($query_string); if ($xml) { $html = theme('diggthis_top_stories', simplexml_load_string($xml)); } else { drupal_set_message(t('An error occurred. Digg top stories could not be retrieved.')); } return $html; }