How to integrate MySql and PHP in Webinator

Post Reply
liu.568
Posts: 3
Joined: Tue Apr 27, 2004 1:24 pm

How to integrate MySql and PHP in Webinator

Post by liu.568 »

Hi!

Is there anyone out there who actually integrated PHP&MySql with Webinator search engine successfully ? I would like to know how to implement this so that I can embed the search engine into the format of our web site! Any suggestion will be appreciated!

Thanks!

Ben
User avatar
mark
Site Admin
Posts: 5514
Joined: Tue Apr 25, 2000 6:56 pm

How to integrate MySql and PHP in Webinator

Post by mark »

What kind of problem are you having? In version 2.x You just create top.html and bottom.html files in your database directory with html required to make the search page look like the rest of your site.
liu.568
Posts: 3
Joined: Tue Apr 27, 2004 1:24 pm

How to integrate MySql and PHP in Webinator

Post by liu.568 »

Hi Mark:

Thank you for the response. Actually on our website, the top of each page has a couple of drop down boxes which displays some data drawn from MySql database. The top of page is saved as an individual file called top.php. Now if I want to convert format of the search results returned by Webinator, how can I embed PHP&MySql codes into search script file provided by Webinator? Once again, thank you for the help!

Ben
User avatar
mark
Site Admin
Posts: 5514
Joined: Tue Apr 25, 2000 6:56 pm

How to integrate MySql and PHP in Webinator

Post by mark »

You can use <fetch> to request the dynamic data from the webserver. In the search script "top" and "bottom" functions fetch urls that give the html for page top and page bottom respectively.

<fetch http://localhost/topboilerplate.php>
<send $ret>


<fetch http://localhost/bottomboilerplate.php>
<send $ret>

Depending on your server setup you may need to use the server's public name instead of localhost. The boilerplate could contain the entire html needed for the page, besides the search results. Or it could just be the dynamic bit to include into hard coded html.
liu.568
Posts: 3
Joined: Tue Apr 27, 2004 1:24 pm

How to integrate MySql and PHP in Webinator

Post by liu.568 »

Mark:

Thank you for the help! That should work! Thanks!


Ben
Post Reply