Page 1 of 1

Finding content in an article directory

Posted: Thu Apr 22, 2010 8:37 am
by johanmalmo
Hi, pretty much a newbie to PHP here...

What I want to do is to have a searchfield on an emty html form. When I put in a search word in this field and click search I want to search an entire website (for instance http://ezinearticles.com) looking for an article on the word I entered in the search field. If an article should be found I want to return the URL for that article.

Like so:

Search word: "Bird"
Article directory: http://ezinearticles.com

Return value: http://ezinearticles.com?birds-are-funny

That is an example... I hope I'm being clear enough in what I'm after :)
Really greatfull for any advice!

/ Johan

Re: Finding content in an article directory

Posted: Thu Apr 22, 2010 1:04 pm
by Christopher
You might want to look at Lucene for search indexing. Zend Framework has a nice library for that.

Re: Finding content in an article directory

Posted: Thu Apr 29, 2010 2:39 pm
by johanmalmo
Their must be a much easier way than that..?

Anyone? You shouldn't have to use indexing and stuff like that?

Re: Finding content in an article directory

Posted: Thu Apr 29, 2010 3:29 pm
by Christopher
Is it that difficult? Have you looked at the documentation?

You can loop through directory listing in you site, load the file contents and do string matching. But the whole point of indexing is that it makes it reasonably fast.