com web/php: Turn off the API search here too: quickref.php
| From: | Rasmus Lerdorf | Date: | Wed, 30 Oct 2013 22:31:10 +0000 |
| Subject: | com web/php: Turn off the API search here too: quickref.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-16992@lists.php.net to get a copy of this message | ||
Commit: 966a13442aa328b89a977dd4a056007f1e232d1f
Author: Rasmus Lerdorf <rasmus@lerdorf.com> Wed, 30 Oct 2013 15:31:10 -0700
Parents: a80bcfebd2f42bfa89410245cf6966525497b9cf
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=966a13442aa328b89a977dd4a056007f1e232d1f
Log:
Turn off the API search here too
Changed paths:
M quickref.php
Diff:
diff --git a/quickref..php b/quickref.php
index af29f6c..78550d7 100644
--- a/quickref.php
+++ b/quickref.php
@@ -132,7 +132,6 @@ if ($snippet = is_known_snippet($notfound)) {
}
?>
-<h1>Perform an alternative search here</h1>
<?php
// TODO Fix encoding issues. We encode this earlier. Using _decode for now.
// We allow users to search for tags like <foo>
@@ -154,7 +153,8 @@ if ($snippet = is_known_snippet($notfound)) {
// Don't do a web search if the search term contains:
// tp:// since we are seeing a lot of proxy attempts through the 404 handler
// admin/ since these tend to be script-kiddie hack attempts
-if(strlen($notfound) > 2 && !strstr($notfound,'tp://') &&
!strstr($notfound,'admin/')):
+#if(strlen($notfound) > 2 && !strstr($notfound,'tp://') &&
!strstr($notfound,'admin/')):
+if(0): // Turn of API search for now since Bing is no longer free
$srch_rqst =
"/ws.php?profile=$scope&q=".urlencode($notfound)."&lang=$LANG&results=10&start=0&mirror=".trim(substr($MYSITE,7),'/');
$url = "http://php.net".$srch_rqst;
$data = fetch_contents($url);