Login   Register  
PHP Classes
elePHPant
Icontem

File: sugestext.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Forud A  >  Open Search for PHP  >  sugestext.php  >  Download  
File: sugestext.php
Role: Example script
Content type: text/plain
Description: example
Class: Open Search for PHP
Add support to a given search engine in a browser
Author: By
Last change:
Date: 2009-07-25 14:17
Size: 888 bytes
 

Contents

Class file image Download
<?php
    
require_once ('osearch/opensearch.php');
    if (isset(
$_GET['q']))
        
$query=$_GET['q'];
    else
        die();
    
$tmp=new OSSuggestions($query);
    
$a=' A';
    
//Just simply add some data .... (for this example) you may add
    //data from database or similar source
    
$tmp->add_field($query.($a++),rand(1,1000).' Results');
    
$tmp->add_field($query.($a++),rand(1,1000).' Results');
    
$tmp->add_field($query.($a++),rand(1,1000).' Results');
    
$tmp->add_field($query.($a++),rand(1,1000).' Results');
    
$tmp->add_field($query.($a++),rand(1,1000).' Results');
    
$tmp->add_field($query.($a++),rand(1,1000).' Results');
    
$tmp->add_field($query.($a++),rand(1,1000).' Results');
    
$tmp->add_field($query.($a++),rand(1,1000).' Results');
    
$tmp->add_field($query.($a++),rand(1,1000).' Results');
    
$tmp->serve();
    
//$tmp->save_to_file('opensearch.xml');
?>