com web/php: The Bing search API hasn't worked for a while, and it is no longer free, so turn it off entirely: results.php
| From: | Rasmus Lerdorf | Date: | Wed, 30 Oct 2013 21:44:34 +0000 |
| Subject: | com web/php: The Bing search API hasn't worked for a while, and it is no longer free, so turn it off entirely: results.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-16991@lists.php.net to get a copy of this message | ||
Commit: a80bcfebd2f42bfa89410245cf6966525497b9cf
Author: Rasmus Lerdorf <rasmus@lerdorf.com> Wed, 30 Oct 2013 14:44:34 -0700
Parents: 6dc0248c3c1281eddb256d36cae25740ac893633
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=a80bcfebd2f42bfa89410245cf6966525497b9cf
Log:
The Bing search API hasn't worked for a while, and it is no
longer free, so turn it off entirely
Changed paths:
M results.php
Diff:
diff --git a/results.php b/results.php
index e874201..34cdc89 100644
--- a/results.php
+++ b/results..php
@@ -46,13 +46,13 @@ $srch_host = "php.net";
$srch_rqst =
"/ws..php?profile=$scope&q=$uq&lang=$ul&results=$per_page&start=$s&mirror=".trim(substr($MYSITE,7),'/');
$url = "http://".$srch_host.$srch_rqst;
-$data = fetch_contents($url);
-if (is_array($data)) {
- // FIXME: if (is_authenticated()) ...
- $comment = '<!-- ' .print_r($data, true). '-->';
- exit_with_pretty_error("Search error", "Internal error", "This mirror
does not support searches, please report this error to <a href='/contact'>our
webmasters</a>" . $comment);
-}
-$res = unserialize($data);
+#$data = fetch_contents($url);
+#if (is_array($data)) {
+# // FIXME: if (is_authenticated()) ...
+# $comment = '<!-- ' .print_r($data, true). '-->';
+# exit_with_pretty_error("Search error", "Internal error", "This mirror
does not support searches, please report this error to <a href='/contact'>our
webmasters</a>" . $comment);
+#}
+#$res = unserialize($data);
// HTTP status line is passed on, signifies an error
site_header(
@@ -64,22 +64,20 @@ site_header(
)
);
-if (!is_array($res)) {
- exit_with_pretty_error(null, 'Internal error', 'Please try again later');
-}
+#if (!is_array($res)) {
+# exit_with_pretty_error(null, 'Internal error', 'Please try again later');
+#}
// No results for query
-if ($res['ResultSet']['totalResultsAvailable'] == 0) {
- echo '<h1>Perform an alternative search instead</h1>';
-
+#if ($res['ResultSet']['totalResultsAvailable'] == 0) {
// TODO Research possible encoding issues
google_cse($q);
site_footer();
exit;
-}
+#}
-search_results($res, $q, $scope, $per_page, $s, $l);
+#search_results($res, $q, $scope, $per_page, $s, $l);
-site_footer();
+#site_footer();
?>