"; print "Please click here"; exit; } # handle moving english manual down into its own directory if (eregi("^(.*)/manual/((html/)?[^/]+)$", $REQUEST_URI, $array)) { if($SERVER_PORT!=80) { $url = "http://".$SERVER_NAME.":".$SERVER_PORT."$array[1]/manual/$lang/".$array[2]; } else { $url = "http://".$SERVER_NAME."$array[1]/manual/$lang/".$array[2]; } $urle = htmlspecialchars($url); header("Location: $url"); print "Redirect to $urle"; print "Please click here"; exit; } $uri=substr($REDIRECT_REDIRECT_ERROR_NOTES,strpos($REDIRECT_REDIRECT_ERROR_NOTES,$DOCUMENT_ROOT)+strlen($DOCUMENT_ROOT)+1); # try to find the uri as a manual entry require "manual-lookup.inc"; if(strchr($uri,'/')) { list($lang,$function) = explode('/',$uri,2); $function = strtolower($function); $lang = strtolower($lang); } else { $function = strtolower($uri); } if (!$lang) $lang = $MIRRORS[$MYSITE][6]; $try = find_manual_page($lang, $function); if ($try) { header("Location: $try"); exit; } ?> 1) { $i=$page-1; $last="Previous page"; } else { $last=" "; } if ($page<$pages) { $i=$page+1; $next="Next page"; } else { $next=" "; } $middle="Displaying results $firstdisplayed to $lastdisplayed"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "

$last
$middle
$next


\n"; } $form=$PHP_SELF; if (!isset($base)) { if (ereg("^(.+//[^/]+)/",$HTTP_REFERER,$reg)) { $base=$reg[1]; } if ($base==$MYSITE) { $base="-"; } } if ($base=="-") { $sourceurl=$PHP_SELF; } else { $sourceurl=$base.$PHP_SELF; } if ($pattern=="") { echo "Error: No search words specified.

"; echo "Click here for a New Search

\n"; exit(); } $words=EscapeShellCmd(UrlEncode($pattern)); $config="php"; if ($show=="source") { $exclude="/manual"; $restrict=$MYSITE."source"; $where="PHP site source code"; } elseif ($show=="manual") { $restrict=$MYSITE."manual"; $exclude="/source"; $where="PHP documentation"; } else { $exclude="/source"; $restrict=$MYSITE; $where="PHP web site"; } if (isset($page)) {$off="&page=$page";} else {$off="";} $query="words=$words&config=$config&exclude=$exclude&restrict=$restrict$off"; exec("$htsearch_prog \"$query\"",$result); $rc=count($result); if ($rc<2) { echo "There was an error executing this query.

Please try later

"; commonFooter(); exit; } if ($result[2]=="NOMATCH") { echo "Sorry, that URL does not exist, and a quick search for the $pattern "; echo "keyword did not turn anything up.

"; commonFooter(); exit; } $matches=$result[2]; $firstdisplayed=$result[3]; $lastdisplayed=$result[4]; $page=$result[5]; $pages=$result[6]; $baseurl=$PHP_SELF."?pattern=$words&show=$show&base=$base"; echo "The page you requested does not exist, however a quick search turned up the "; echo "following potential pages related to your request.

"; makeBar("",$page,$pages,$baseurl,$firstdisplayed,$lastdisplayed); $i=7; #skip response header while($i<$rc) { if ($base=="-") { echo $result[$i]; } else { echo eregi_replace("http://[^.]+\.php\.net/","$base/",$result[$i]); } echo "\n"; $i++; } echo "
\n"; makeBar("2",$page,$pages,$baseurl,$firstdisplayed,$lastdisplayed); ?>

Search results courtesy of
ht:dig