<html>
<head>
<title>Class_google_examples</title>
</head>
<body>
<ul>
<li>INSTALL<br />Just put the class_google.php file in your include_path (see php.ini include path section if you are not sure)</li>
<li>USES:<br />
I'll try to show you this class and how To set up a search with exemples:
<ul>
<li><u>1: Searching phpclasses.org in title:</u>
<ul>
<li>to declare a google object:<br />$google = new google();</li>
<?php
set_time_limit(0);
require_once 'class_google.php';
$google = new google();
?>
<li>set up parameters: search sentence phpclasses.org in title<br />$google->setSentence('phpclasses.org');</li>
<?php
$google->setSentence('phpclasses.org');
?>
<li>set up parameters: search sentence phpclasses.org in title<br />$google->setPosition('title');</li>
<?php
$google->setPosition('title');
?>
<li>get Results <br /><?php echo $google->getResults(); ?> Results found for query (<?Php echo $google->getLink()?>)</li>
<?php
unset($google);
?>
</ul>
</li>
<li><u>2: Searching phplibrairies:</u>
<ul>
<li>to declare a google object:<br />$google = new google();</li>
<?php
require_once 'class_google.php';
$google = new google();
?>
<li>set up parameters: search PHPLIBRAIRIES<br />$google->setSentence('php librairies');</li>
<?php
$google->setSentence('php librairies');
?>
<li>get Results <br /><?php echo $google->getResults(); ?> Results found for query (<?Php echo $google->getLink()?>)</li>
<?php
unset($google);
?>
</ul>
</li>
<li><u>2: Searching PHP in pdf files:</u>
<ul>
<li>to declare a google object:<br />$google = new google();</li>
<?php
require_once 'class_google.php';
$google = new google();
?>
<li>set up parameters: search php<br />$google->setKeywords(array('php'));</li>
<?php
$google->setKeywords(array('php'));
?>
<li>set up parameters: in pdf files<br />$google->setfiletype('pdf');</li>
<?php
$google->setfiletype('pdf');
?>
<li>get Results <br /><?php echo $google->getResults(); ?> Results found for query (<?Php echo $google->getLink()?>)</li>
<?php
unset($google);
?>
</ul>
</li>
</ul>
</li>
</ul>
Contact or more informations <a href="http://www.phplibrairies.com" target="_blank">phplibrairies</a>
</body>
</html>
|