Finding content in an article directory

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
johanmalmo
Forum Newbie
Posts: 2
Joined: Thu Apr 22, 2010 8:27 am

Finding content in an article directory

Post 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
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Finding content in an article directory

Post by Christopher »

You might want to look at Lucene for search indexing. Zend Framework has a nice library for that.
(#10850)
johanmalmo
Forum Newbie
Posts: 2
Joined: Thu Apr 22, 2010 8:27 am

Re: Finding content in an article directory

Post by johanmalmo »

Their must be a much easier way than that..?

Anyone? You shouldn't have to use indexing and stuff like that?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Finding content in an article directory

Post 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.
(#10850)
Post Reply