1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Switching search backend from Yahoo to Bing.

and to head off the inevitable bitching about this, it
is because the Yahoo BOSS v1 API we are using is going
away on July 20 and Yahoo was not willing to give us
free access to the new v2 API. It would end up costing
us about $600/year at our current usage pattern.
The new Google REST API would cost us about $7500/year.
The Bing API is free.
This commit is contained in:
Rasmus Lerdorf
2011-07-14 05:24:48 +00:00
parent ee468d1349
commit 9fd1bae95f
3 changed files with 38 additions and 30 deletions

View File

@@ -71,9 +71,10 @@ $end_result = $s + $res['ResultSet']['totalResultsReturned'] - ($s<2 || $res['Re
$results_count = ($res['ResultSet']['totalResultsAvailable'] < 100 ? $res['ResultSet']['totalResultsAvailable'] : 'more than 100');
$disp_start_result = $start_result + 1;
$disp_end_result = $end_result + 1;
echo <<<EOB
<h2>Showing results $start_result to $end_result of $results_count</h2>
<h2>Showing results $disp_start_result to $disp_end_result of $results_count</h2>
<ul id="search-results">
EOB;
$pos = $res['ResultSet']['firstResultPosition'];
@@ -131,9 +132,8 @@ EOB;
}
echo <<<EOB
</ul>
<span style="margin-left: 3em; margin-top: 1em; float: left;"><a href="http://developer.yahoo.net/about">
<img src="http://l.yimg.com/a/i/us/nt/bdg/websrv_120_1.gif" border="0">
</a></span>
<span style="margin-left: 3em; margin-top: 1em; float: left; font-family: Verdana, Tahoma, Helvetica, Arial;
font-size: 11px; color:#555;">Results by <img src="/images/bing.png"/></span>
<div id="results_nav"><h4>Results Page:</h4>
<ul id="results_nav_list">
EOB;