473,670 Members | 2,331 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_repl ace(".","_",$sk unk);
$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_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>
Mar 28 '07 #1
2 1747
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*********@gma il.com
"Olemme apinoiden planeetalla."
Mar 28 '07 #2
<comp.lang.ph p>
<Rami Elomaa>
<Wed, 28 Mar 2007 22:13:58 +0300>
<eu**********@n yytiset.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
4136
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 developed with PHP, you are not supposed to doubt that. As a proof that PHP pages could be crawled and indexed, refer this Google search
6
1682
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 webserver. I try to write a website which allow to send order form to email. Now I facing the problem, because I need to test it at localhost. Can anyone advice me. Thanks. Regards, C.K.
6
2261
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 only. http://www.casespace.net I designed it with firefox (plus the autohide extension) in mind, but also want to support IE. Online and offline it works great in Firefox. Offline it also works
1
2101
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 not interested to write a webservices or complex Smart client for this. Any simple way like manipulating it in HTML applications(HTA). Any thoughts on it? Regards
0
1102
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 website!!! And not only that, but ASP.net replies normally then as if the user had visited a website's page So I may have a user saving off the login page, then logging in from the offline saved page. It will log them in OK, but later on as...
1
1600
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 interested to write a webservices or complex Smart client for this. Any simple way like manipulating it in HTML applications(HTA). Any thoughts on it? Regards Sal
6
1508
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 hosted by an internet host and want to add a PHPBB2 forum hosted on my own server. What I would like to introduce to my website is something like this
8
2135
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 - $3000 setup fee and then $150 monthly to get your website search optimized ? I used the domaintools.com and it seems like my website had higher SEO rating and tag relevance than the example site he was showing me. I did not pay attention to search...
6
1595
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
8471
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8907
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8817
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8593
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5687
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4396
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2804
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.