473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

search a offline website

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_replace(".","_",$skunk);
$pass=1;
if ($rambo<>"127_0_0_1") {$pass=0;}
if ($pass==0) {print " &nbsp; &nbsp; &nbsp; 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_background">

<br>

<table width="950" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td>
<a href="aaasearch.php" class="bbb">Search</a>
</td>
</tr>
</table>

<br>

<?php
$zentry=$_REQUEST['entry'];
if ($zentry=="") {$zentry="nowt";}
?>

<?php

$batman=0;

$dir=".";
$joker=opendir($dir);
while (false!==($boywonder=readdir($joker)))
{
$files[]=$boywonder;
$batman=$batman+1;
}

$temp=0; $loopy=1;
while ($temp<$batman)
{
$demo=$files[$temp];
$pace=strlen($demo);
$junk=substr($demo,$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="aaasearch.php" method="post">

<tr>
<td><input type="text" name="entry" value="<?php print $zentry; ?>"
size="77" class="ta_delivery_form_06"></td>
<td class="bba"&nbsp; </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="$demo"; $fp=fopen($filename,"r");

while (!feof($fp))
{
$qaz=fgets($fp); $wsx=trim($qaz); $edc=stripslashes($wsx);
$hod[$rocky]=$edc;
$rocky=$rocky+1;
}

fclose($fp);

$rocky=$rocky-1;

$zentry=strtolower($zentry);

$lainey=1;
while ($lainey<$rocky)
{

$hod[$lainey]=strtolower($hod[$lainey]);
$rip=" $hod[$lainey] ";
$witt=strpos($rip,$zentry);
$grab=$lainey+1;
if ($witt==true) {print "<span class=bbb><b>$demo ... $grab <br></b>
</span>";}

$lainey=$lainey+1;
}

$jazz=$jazz+1;
}

?>
</td>
</tr>

</table>

<br><br>

</BODY>
</HTML>
Mar 28 '07 #1
2 1734
Krustov kirjoitti:
I wrote this a while ago and found it comes in very handy at times .
I just love your wacky variable names, like $batman and $boywonder,
$rambo and $rocky. Who needs descriptive variable names, anyway? It's
not like someone is supposed to understand the code that you post to
usenet, obfuscating source code is the new Web 2.0!

On a sidenote, I can't make head or tails out of your code... Basicly it
seems that if someone enters the page using the server as a desktop (ie.
if user's ip is 127.0.0.1, aka. localhost) then for some reason the page
is denied and an error message is displayed, but I'm having serious
trouble understanding why and also WHY?

All in all, I think this post deserves the title of most worthless and
useless post of the month, unless you're counting my reply. Kudos for
both of us, we sure know how to waste other peoples time!

--
Ra*********@gmail.com
"Olemme apinoiden planeetalla."
Mar 28 '07 #2
<comp.lang.php>
<Rami Elomaa>
<Wed, 28 Mar 2007 22:13:58 +0300>
<eu**********@nyytiset.pp.htv.fi>
I just love your wacky variable names, like $batman and $boywonder,
$rambo and $rocky.
A while ago when i posted some similar code - a user posted to say he
knew a bird who only ever used disney characters as variable names .

Mar 28 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: R. Rajesh Jeba Anbiah | last post by:
Q: Is PHP search engine friendly? Q: Will search engine spiders crawl my PHP pages? A: Spiders should crawl anything provided they're accessible. Since, nowadays most of the websites are been...
6
by: CK | last post by:
Hi All, Can i know that, is it possible for me to develop a website offline, and using CDO. How i can know that, the script I wrote at offline and run at localhost will work when I host it on the...
6
by: cjl | last post by:
I have a website which allows people to view interesting radiology cases. It is for teaching radiology residents. It is designed to run in fullscreen or 'kiosk' mode, at 1024 x 768 resolution...
1
by: jobi.joy | last post by:
I have a requirement of having the capability of offline form filling for my website.So users can some way download the form and can fill out in offline mode. Any standard way to do this. I am...
0
by: George Birbilis | last post by:
I have a problem with a big ASP.net app with users saving pages to the disk and then opening them from the disk, filing them and trying to post them back. Seems IE posts them back to the original...
1
by: Salomi | last post by:
I have a requirement of having the capability of offline form filling for my website.So users can some way download the form and can fill out in offline mode. Any standard way to do this. I am not...
6
by: malcolm | last post by:
Hi, I would like help to get started on an idea. I have prior knowledge of how to do this so please be gentle with me as I am a complete beginner when it comes to ASP. I have a website...
8
by: Roman | last post by:
I received a marketing call from a guy first showing me my website and then some other website and ranking of that other website. My questions is it worth paying to SEO corporation a $1200 -...
6
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, what determines how high a website's ranking will appear after being searched? what can i do to my website to give it a good chance of being ranked pretty high? thanks, rodchar
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.