';
}
// for the alexa rank
function getalexa() {
$homepageurl = get_bloginfo('home');
$request_url = "http://data.alexa.com/data?cli=10&dat=snbamz&url=".$homepageurl;
$xml = simplexml_load_file($request_url) or die ("Feed not loading, sorry");
return $xml->SD->POPULARITY['TEXT'];
}
function showalexa() {
echo "The Alexa rank of this website is "; echo getalexa(); // this needs cleaning up in release version.
}
// checking backlinks
function yahoo_backlinks() {
?>
Stats by Complete Stats";
echo $after_widget;
// the widget ends here. The next bit is important, please don't edit it.
}
register_sidebar_widget('Complete Site Stats', 'widget_complete_site_stats', null, 'Complete_Site_Stats');
function widget_complete_site_stats_control() {
$options = $newoptions = get_option('widget_complete_site_stats');
if ( $_POST["complete_site_stats-submit"] ) {
$newoptions['title'] = strip_tags(stripslashes($_POST["complete_site_stats-title"]));
if ( empty($newoptions['title']) ) $newoptions['title'] = 'Stats';
}
if ( $options != $newoptions ) {
$options = $newoptions;
update_option('widget_complete_site_stats', $options);
}
$title = htmlspecialchars($options['title'], ENT_QUOTES);
}
endif;
}
add_action('init', 'widget_css_launch');
/* And we're finished. This plugin took about 5 hours of my work, and if you find any problems, post them on my bug tracker
* http://bugs.gpearce.co.uk
*/
?>