Login   Register  
PHP Classes
elePHPant
Icontem

File: example2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Vijay Immanuel  >  Google API Access for PHP  >  example2.php  >  Download  
File: example2.php
Role: Example script
Content type: text/plain
Description: Example to use this library to access Google cached pages
Class: Google API Access for PHP
PHP class library to access the Google API viaSOAP
Author: By
Last change:
Date: 11 years ago
Size: 450 bytes
 

Contents

Class file image Download
<?php

/*
* Example to access Google cached pages through GoogleSearch for PHP.
*/

require_once 'GoogleSearch.php';

$gs = new GoogleSearch();

//set Google licensing key
$gs->setKey("your_google_authentication_key");

$page_result $gs->doGetCachedPage("http://www.google.com");

if(!
$page_result)
{
    if(
$err $gs->getError())
    {
        echo 
"<br>Error: " $err;
    }
}
else
{
    echo 
"Requested Page: " $page_result;
}

?>