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

Don't send proxy attempts through the backend web search

This commit is contained in:
Rasmus Lerdorf
2011-07-16 07:07:46 +00:00
parent aad52615ab
commit bf3831c9d9

View File

@@ -151,7 +151,8 @@ $notfound_enc = urlencode($notfound_sc);
<?php quickref_table($maybe, false); ?>
<?php
if(strlen($notfound) > 2):
// 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
if(strlen($notfound) > 2 && !strstr($notfound,'tp://')):
$srch_rqst = "/ws.php?profile=$scope&q=".urlencode($notfound)."&lang=$LANG&results=5&start=0&mirror=".trim(substr($MYSITE,7),'/');
$url = "http://www.php.net".$srch_rqst;
$data = fetch_contents($url);