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

Turn off the API search here too

This commit is contained in:
Rasmus Lerdorf
2013-10-30 15:31:10 -07:00
parent a80bcfebd2
commit 966a13442a

View File

@@ -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);