<?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'); ?>
|