Thu 30 Jun 2005
I’ve got the Yahoo! API powering the search on my work’s website. The programming was easy. Using it is easy. The change process is hard.
I’m using PHP to convert the XML into a multidimentional array, and then looping through the results. To limit the results I was appending site:http://mysite to the search string.
The one difficulty I had was with handling big search strings with lots of OR operators. It seemed to drop the end of the query with the site: parameter and our site would then serve results from anywhere. To get around this I prepend it to the query. Also I added an extra check to confirm that the results are actually from our site.
Results are very good. Thanks Yahoo!
Hey do u knw how to remove the limitation of the number of returned results using the yahoo api at the end of the url (i.e &result=50).
i tried removing it and it then displays only 10 results. how can i get the output in the same way as yahoo does it on their site.
what i mean by this is limit 10 results per page and more than 200 total results.
(like this:
1 - 10 of about 21,600,000 for bangalore - 0.12 sec.)
and then having 1,2,3,4..etc to go to the next 10 results and so on
Have a look at the documentation on the Yahoo site. The total number of results is returned in the response. You can set the start result number to whatever you want.