Revision: 42125
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at February 28, 2011 00:01 by shinokada
Initial Code
<?php
$start = date('Y-m-d', (time() - (60 * 60 * 24 * 30)));
$end = date('Y-m-d');
$showpages = 10;
$thispage = 1;
$login = new GADWidgetData();
$ga = new GALib($login->auth_token, $login->account_id, 60);
$pages = $ga->pages_for_date_period($start, $end);
echo "<ul>";
foreach($pages as $page) {
$url = $page['value'];
$title = $page['children']['value'];
$array = array('(not set)', 'Okada Design Blog', 'Downloads | Okada Design Blog', 'Downloads « Okada Design Blog');
// You need to add any words which you don't want to show in the list
if(!in_array($title, $array)){
$takeout = array(" | Okada Design Blog"," « Okada Design Blog");
// You need to add any words which you want to delete in the list
$newtitle = str_replace($takeout, "", $title);
echo '<li><a href="' . $url . '" rel="nofollow">' . $newtitle . '</a></li>';
$thispage++;
}
if($thispage > $showpages) break;
}
echo "</ul>";
?>
Initial URL
Initial Description
Initial Title
Most popular articles for wordpress
Initial Tags
wordpress
Initial Language
PHP