|
|
I love it when a plan comes together (continued)
You can use ht://Dig straight, meaning without any further goodies, but I wanted to be able to dynamically load ads and our ZATZ bar on each page of search results. It turned out that meant that I had to find a tool for service side scripting that'd integrate with ht://Dig. At first, I looked at Perl (Practical Extraction and Reporting Language), but while Perl can literally do anything, its syntax is a bit too cryptic for my tastes.
So, instead, I found a language called PHP. PHP stands for "PHP: Hypertext Preprocessor," a naming redundancy that's a favorite in-joke of a certain cut of programmer. The idea is that the first word or letter becomes part of the acronym, so, for example, MINCE stands for "Mince is Not Completely EMACS," and some folks even claim that Linux stands for "Linux is Not UNIX."
Yeah, well, at least the software's good.
In any case, PHP is a very powerful scripting language that integrates into the Linux environment. Of course, to do what I needed to do, first I had to learn a new programming language. The things I do to make our readers happy!
Finally, of course, we needed a Web server running on the Linux machine. Apache, perhaps the most popular Web server on the Web, was the obvious choice. Like all other aspects of Linux, it was a little funky to use at first, but by the tenth reading of the O'Reilly book, I figured out the basics.
Eventually, I got it all together, and so now you can search our magazines. When you enter in a request, you're talking to Apache, which sends the request to PHP, which asks for a list of matches from ht://Dig, which then searches a series of index files. The ht://Dig program returns those matches to PHP, which then cleans them up so they look better, grabs an ad banner and the ZATZ bar, and formats a series of search results pages.
Seriously, though, despite my frustrations with some of the aspects of Linux, the overall cost of this solution was very low, and the performance was very high. That, by the way, is a formula that more "dot-coms" should use if they want to stay in the game.
So, now, you can go to the home page of any of our magazines and search our back issues. You now have, at your fingertips, the single largest searchable archive of original, edited, Palm-related content anywhere on the planet.
Ah, but as always, there's more. One of the things I wanted to do was to make sure you could search PalmPower from your own Web sites. In fact, it's really easy. Just paste the following code into your Web page:
<form method="get" action="http://search.palmpower.com/search.php3">
<input type="hidden" name="method" value="or">
<input type="hidden" name="go_search" value="1">
Search PalmPower: <input type="TEXT" size="13" name="words">
<input type="submit" value="Go" name="submit">
</form>
|
|
|
|
|