PHP Classes

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    
Ratings Unique User Downloads Download Rankings
StarStarStar 40%Total: 195 All time: 8,530 This week: 206Up
Version License PHP version Categories
boolean-search-query 1.0BSD License5.0PHP 5, Searching, Text processing


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
Picture of Hemant Kumar Tiwary
  Performance   Level  
Name: Hemant Kumar Tiwary is available for providing paid consulting. Contact Hemant Kumar Tiwary .
Classes: 2 packages by
Country: India India
Age: 45
All time rank: 2539151 in India India
Week rank: 301 Up22 in India India Up
Innovation award
Innovation award
Nominee: 1x


Author : Hemant Kr Tiwari Email : Contact : +91-9818664766 Blog : 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 Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,530
This week:206Up
 User Ratings  
 All time