Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Sunny Rajpal  >  Google Total Results  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: example
Class: Google Total Results
Get the number of results for given Google search
Author: By
Last change:
Date: 7 years ago
Size: 708 bytes
 

Contents

Class file image Download
<?
    
/*
    // example usage of google_total_results.inc.php
    */
    
    
define("NL","<BR>");
    
//define("NL","\n");
    
    
include_once("google_total_results.inc.php");

    echo 
"Search results for: Sunny Rajpal".NL;
    
$g = new GoogleTotalResults("Sunny Rajpal");
    
$results $g->getResults();
    if (
$results !== false)
        echo 
"Results: ".number_format($results,0).NL;
    else
        echo 
"Failed to get Results [".$g->getLastError()."].".NL;
    
    echo 
"Search results for: \"Sunny Rajpal\"".NL;
    
$g->setSearchTerm("\"Sunny Rajpal\"");
    
$results $g->getResults();
    if (
$results !== false)
        echo 
"Results: ".number_format($results,0).NL;
    else
        echo 
"Failed to get Results [".$g->getLastError()."].".NL;
?>