Forum Moderators: coopster
Example;
I have a site that has newspaper links on it. I want to have a search box on my site that allows users to do a search of all local newspapers. Say they type in murder, the search box would then go out and search any defined sites for the term murder and then generate a results page (on my server) showing all the match stories from the sites searched.
Can this be done easily? Is there a pre-made script out there for such?
Thanks in advance.
regards
Henry
I think you're basically asking for a search of several newspapers that are being served up via third parties. If those newspapers have their own search functions and those search functions have a published API (i.e. documented way to send search queries from an external site), then you might be able write a script that will search the newspapers in question. I would guess that it would have to be tailored to each paper.
Tom
[edited by: ergophobe at 4:30 am (utc) on Aug. 9, 2004]
What about something like curl [ca3.php.net]?
Connect to one site, retrieve results
Connect to second site, retrieve results
Connect to third site, retrieve results
display results
You would have to watch that something like this didn't become slow due to too many results and handle the possibility that one of the sites didn't respond.
Probably the short answer to your question is: No, this isn't real easy, not if you have to ask the question. It'll involve learning to program and tweak stuff, unless you can figure out an easy enough interface with phpdig or htdig. That wouldn't go to the other pages on each request - it'd make a search engine out of your site, where the info would have to be stored first. You'd have to set things up to regularly go spider those other sites, and all that data would sit on your server (could be lotsa disk usage).