Login   Register  
PHP Classes
elePHPant
Icontem

File: access_top_pages.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Manuel Lemos  >  PHP Webmaster Tools API  >  access_top_pages.php  >  Download  
File: access_top_pages.php
Role: Example script
Content type: text/plain
Description: Example script to retrieve the top site pages with more search visits
Class: PHP Webmaster Tools API
Access Google Webmaster Tools API for given sites
Author: By
Last change:
Date: 10 months ago
Size: 781 bytes
 

Contents

Class file image Download
<?php
/*
 * access_top_pages.php
 *
 * @(#) $Id: access_top_pages.php,v 1.3 2013/07/16 12:36:48 mlemos Exp $
 *
 */

    
require('http.php');
    require(
'oauth_client.php');
    require(
'xml_parser.php');
    require(
'web_master_tools.php');
    require(
'forms.php');
    require(
'form_layout_vertical.php');
    require(
'top_pages.php');

    
$top_pages = new top_pages_class;
    if((
$success $top_pages->Initialize()))
        
$success $top_pages->Finalize($top_pages->Process());
    if(
$top_pages->exit)
        exit;
    if(
$success)
        
$top_pages->Output();
    else
    {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Top pages error</title>
</head>
<body>
<h1>Top pages error</h1>
<pre>Error: <?php echo HtmlSpecialChars($top_pages->error); ?></pre>
</body>
</html>
<?php
    
}
?>