I have completed my PHP/MySql search engine for my on-line pictures to the point where I can release it to the internet-at-large! I have added a search field to my main blog page as well as my picture page for easy access.
Right now, I have it loaded with 469 pictures. That should increase to more than 500 within a few weeks as I get more pictures from this year included.
The search page can definitely be refined, and I expect to be able to have fun tweaking it. Among the possible changes I am considering are:
- more user-control over fields to search against
- prettier layout
- boolean searches (and, or, not)
The way I've developed the search engine is rather convoluted. The actual search page is pretty straight-forward. It's a PHP page that interacts with a MySQL database that holds all the picture information. No big deal.
The tricky part is getting the database loaded with the picture data. I wrote a parsing engine that extracts the picture data from the iPhoto/BetterHTMLExport/Galerie pages that are created when I export my photos from iPhoto and upload them to my webserver. This code is very complicated (it parses the outputted HTML files) and very sensitive to settings and versions of the export process.
Now that my search engine is coming together, I might be able to avoid this parsing step altogether - why not upload just the pictures to the webserver and insert the appropriate data into MySQL? This might be a pretty easy Applescript to write against iPhoto. Maybe someday...
Posted by Rob Reid at November 12, 2003 01:20 PM