PHP Classes

File: access_top_pages.php

Recommend this page to a friend!
  Packages 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: Restored.
Date: 9 years ago
Size: 1,419 bytes
 

 

Contents

Class file image Download
<?php
/*
 * access_top_pages.php
 *
 * @(#) $Id: access_top_pages.php,v 1.8 2017/01/22 11:59:56 mlemos Exp $
 *
 */

    define('APPLICATION_PATH', '.');

    /*
     *  Get the http.php file from http://www.phpclasses.org/httpclient
     */
    require('http.php');

    /*
     *  Get the oauth_client.php and file_oauth_client.php files
     *  from http://www.phpclasses.org/oauth-api
     */
    require('oauth_client.php');
    require('file_oauth_client.php');
    
    /*
     *  Get the forms.php and form_layout_vertical.php files
     *  from http://www.phpclasses.org/formsgeneration
     */
    require('forms.php');
    require('form_layout_vertical.php');
    
    require('top_pages.php');
    require('web_master_tools.php');
    require(APPLICATION_PATH.'/configuration/configuration.php');

    $options = new configuration_options_class;
    $options->application_path = APPLICATION_PATH;
    $options->initialize();

    $top_pages = new top_pages_class;
    $top_pages->options = $options;

    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
    }
?>