Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using search results in my website from another website 2

Status
Not open for further replies.

golcarlad

Programmer
Nov 23, 2004
232
GB
Is it possible for me to incorporate in MY SITE, search results from another website - in this case I think its called a mash-up or something, if so can someone give me some pointers about how I would do such a thing?
 
Use a server-side solution (assuming the search site doesn't already offer an API for your needs). I would refer to a server-side solution as "page scraping" - where the page that is requested is "scraped" (parsed) server-side for the information you want to then display. I typically do this in PHP - check your ISP for what options you have available. Oh... and check with the website to make sure they are OK with you doing this - nobody wants to get a nasty letter from a law firm [smile]

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Just so that you're aware, a "page scraping" script will nearly always come unstuck when the design/structure of the target page changes because the technique involves retrieving the HTML source of the target page then hunting for appropriate tags from which to strip data. The HTML source/structure changes and your script will likely break.

Another reason why it's best to make them aware of what you are doing is that, if they are planning a site redesign, they could potentially give you some advanced warning (although it would be exceedingly kind of them to do that of their own accord) so that your server-side script wouldn't be "broken" for too long and you'd have some idea why your script suddenly wasn't working.

I had a quick look at yell.com and it doesn't look like they have any API you can tap into. These pages might be of interest to you, but you've probably already found them:
and The "Tools" page lists various ways to link to Yell, maybe that's another option if you don't want to go down the page scraping route.

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Guys - thanks for all that, it was more than I could have hoped for - very kind of you - thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top