Static HTML Website Search Tool

Last Update
22 February 2010
Regular License
$6
Extended License
$30
Sales
422

Easy HTML Website Search Tool in PHPsearch html files on your website

UPDATE ! a better version of this item is available as a PHP Search Engine. Please click here for more information: the simple PHP search engine.

Who is this for?

Anyone with a normal HTML website that wants a quick and easy way to add a search field to their website A folder full of PDF ’s that you want to index and make searchable via your website Search feature on a intranet website that normal search engines cannot index Anyone not happy with restrictions in tools such as Google embedded search Adding an instant search feature to a new website, when tools like Google may take months to index every page, file, and PDF on your website Someone who wants file names in a folder (eg: word documents, zip files) to be searchable and returned in results Advanced users can use the php callback function to inject custom items into the result set, eg: by quering a mysql database of products for the search query (example provided)

Demo’s

Live Preview #1Live Preview #2Live Preview #3Live Preview #4Live Preview Admin Page

Features include:

Easy to install and configure Searches all HTML files on your website Super fast searching! No database required – even easier to install! Finds matching file names (eg: searching for ‘report’ will find a file called ‘latest report .doc‘) Finds matches in HTML META tags Finds matches in url’s (eg: searching for ‘products’ will find a file called ‘/website/my- products .html‘) It will even search INSIDE PDF DOCUMENTS! The results are sorted by relevance in a page-by-page view similar to Google. The text that displays under each search result is trimmed to a certain length so it fits on the page nicely. Any matching keywords in the results are highlighted so the user can see why that result was returned. Advanced users:A custom callback function is included so you can insert your own results in with normal HTML results (eg: by querying a database of products for a match). This makes for great search integration between different products on an existing website.

Note: pdf document support is only available on Linux hosting accounts that have “pdftotext” installed. Please contact your hosting provider to check if pdftotext is installed. Configuration: You can control the following options:

Which folders to search for HTML files Which folders to search for DOCUMENTS (eg: word, pdf, jpeg, mov) Which file names to ignore and never display in search results How many results to display on each page Plus many more advanced settings in the config.php file There is an easy to use admin page which helps you configure these.

Requirements

PHP5 Linux hosting account (have not tested on Windows but it should work) “pdftotext” utility installed if you wish to search PDF files (contact your hosting provider to see if it is installed) Know how to upload files to your website (eg: with FTP ) Know some basic HTML /CSS so you can style the search results page (to suit your look & feel) if the defaults do not work.

How to install:

Unzip the file from CodeCanyon Upload search.php to your website (eg: yourwebsite.com/search.php ) Upload phpsearch_files/ folder to your website (eg: yourwebsite.com/phpsearch_files/ ) Visit the administration page by going to yourwebsite.com/phpsearch_files/admin.php Set “write” permissions via FTP remote view on the phpsearch_files/search_cache/ folder (contact me if you get stuck doing this) Create a form on your website like this: <form action="search.php" method="GET"> <input type="text" name="search"> <input type="submit" name="go" value="Search Website"> </form>

Done(replace yourwebsite.com with your actual website address above)

How to style the search results page:

Open the phpsearch_files/header.php file in Notepad or your favorite HTML editor (eg: Dreamweaver) Delete any default HTML content from this file. Copy & Paste any HTML code you would like to display above the search results into this file. Open the phpsearch_files/footer.php file in Notepad or your favorite HTML editor (eg: Dreamweaver) Delete any default HTML content from this file. Copy & Paste any HTML code you would like to display below the search results into this file. Advanced users: you can do PHP includes eg: <?php include(“your_header_file.php”);?> into these two files. Advanced users: you can also <?php include(“search.php”);?> from one of your existing files to display results there. You can edit the CSS in phpsearch_files/phpsearch.css to match the colours to your website design if the defaults do not work. Done.

Product Support If you require assistance please feel free to use our support system by clicking here. Please do not post support requests on the item discussion board – these are not checked regularly and your question may go unanswered for weeks.