I wrote this a while ago and found it comes in very handy at times .
For example , If you want to know what webpages use a certain stylesheet
its just a matter of typing in the stylesheet name and searching for it
..
If found , It will display the *****.php filename and the line number
the stylesheet was found on .
Obviously you can search for any string or variable etc .
aaasearch.php so its always at the top of the folder .
<?php
$skunk=$_SERVER['REMOTE_ADDR']; $rambo=str_repl ace(".","_",$sk unk);
$pass=1;
if ($rambo<>"127_0 _0_1") {$pass=0;}
if ($pass==0) {print " online search not allowed
online"; exit;}
?>
Personally i dont upload the file to the webspace - but if you do then
you could add something like the above if wanted .
<html>
<head>
<title>null</title>
</head>
<body text="#FF0000" link="#FF0000" vlink="#FF0000" alink="#FF0000"
class="ta_backg round">
<br>
<table width="950" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td>
<a href="aaasearch .php" class="bbb">Sea rch</a>
</td>
</tr>
</table>
<br>
<?php
$zentry=$_REQUE ST['entry'];
if ($zentry=="") {$zentry="nowt" ;}
?>
<?php
$batman=0;
$dir=".";
$joker=opendir( $dir);
while (false!==($boyw onder=readdir($ joker)))
{
$files[]=$boywonder;
$batman=$batman +1;
}
$temp=0; $loopy=1;
while ($temp<$batman)
{
$demo=$files[$temp];
$pace=strlen($d emo);
$junk=substr($d emo,$pace-4,4);
if ($junk==".php") {$kk[$loopy]=$demo; $loopy=$loopy+1 ;}
$temp=$temp+1;
}
?>
<br>
<table border="0" cellspacing="2" cellpadding="0" align="center">
<form action="aaasear ch.php" method="post">
<tr>
<td><input type="text" name="entry" value="<?php print $zentry; ?>"
size="77" class="ta_deliv ery_form_06"></td>
<td class="bba"&nbs p; </td>
<td><input type="submit" name="Submit" value="SEARCH PHP FILES"
class="ta_form_ button"></td>
</tr>
<input type="hidden" name="user" value="<?php print $uzi; ?>">
</form>
</table>
<br>
<table width="950" border="0" cellspacing="1" cellpadding="0"
align="center">
<tr>
<td>
<?php
$jazz=1;
while ($jazz<$loopy)
{
$rocky=0;
$demo=$kk[$jazz];
$filename="$dem o"; $fp=fopen($file name,"r");
while (!feof($fp))
{
$qaz=fgets($fp) ; $wsx=trim($qaz) ; $edc=stripslash es($wsx);
$hod[$rocky]=$edc;
$rocky=$rocky+1 ;
}
fclose($fp);
$rocky=$rocky-1;
$zentry=strtolo wer($zentry);
$lainey=1;
while ($lainey<$rocky )
{
$hod[$lainey]=strtolower($ho d[$lainey]);
$rip=" $hod[$lainey] ";
$witt=strpos($r ip,$zentry);
$grab=$lainey+1 ;
if ($witt==true) {print "<span class=bbb><b>$d emo ... $grab <br></b>
</span>";}
$lainey=$lainey +1;
}
$jazz=$jazz+1;
}
?>
</td>
</tr>
</table>
<br><br>
</BODY>
</HTML>