PHP Classes
elePHPant
Icontem

PHP Boolean Search String: Convert boolean text into Google search expression

Recommend this page to a friend!
  Info   View files Documentation   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2014-10-20 (2 years ago) RSS 2.0 feedNot enough user ratingsTotal: 155 All time: 8,162 This week: 783Up
Version License PHP version Categories
boolean-search-query 1.0BSD License5.0PHP 5, Searching, Text processing
Description Author

This class can convert boolean text into Google search expression.

It takes as parameter a text string with a boolean expression made of single words, quoted words and operators like AND, OR and NOT.

The class returns a string suitable for entering in search engines like Google that represents the same boolean expression using the search engine equivalent symbols like + and - .

Innovation Award
PHP Programming Innovation award nominee
October 2014
Number 6


Prize: One subscription to the PDF edition of the PHP Architect magazine
Search engines like Google take a special syntax to define how to combine several keywords into a more complex search query.

This class takes a simple English query with boolean operands like AND, OR and NOT to build a query to perform that search in Google.

Manuel Lemos
  Performance   Level  
Name: Hemant Kumar Tiwary <contact>
Classes: 2 packages by
Country: India India
Innovation award
Innovation award
Nominee: 1x

Details
Author : Hemant Kr Tiwari
Email : t.hemantkumar@gmail.com
Contact : +91-9818664766
Blog : http://hemant-uniquescience.blogspot.in/

Licence : GNU General Public License


This Class is used to generate boolean search string that further used in mysql query string

Requirement:

1. PHP
   Version: PHP 5.0+


2. How to use

Include the class file and add below code to generate boolean search string. 

Add below code to get the output


$text = '"account manager" or python and linux';

$obj  = new GenerateBooleanQueryString($text);

echo $obj->boolean_string;
  Files folder image Files  
File Role Description
Accessible without login HTML file example.php Output Contain example
Plain text file GenerateBooleanQueryString.php Class contain php code
Accessible without login Plain text file README Doc. Contain uses
Plain text file index.php Class improve the class to add more complex search
Accessible without login Plain text file README.md Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 40%
Total:155
This week:0
All time:8,162
This week:783Up