Search Script for Wapbuddy like scripts?

Started on the old forum in July 2009 · view the original in the archive · old links redirect here

9 replies · 638 views · started 17 years ago · 1 min read

3 participants
koizumi Developer · 81 posts #1

is there any search script for wapbuddy like scripts? coz spider's Wappbuddy edit with a search script doesnt work.

rukiya Lead · 569 posts #2

$wtlf is needed to put in a html form send the value using $_REQUEST.

<?php
//==========
// Configuration
//==========
$directory = '/var/www/'; //trailing slash
$wtlf = 'signature'; //what to look for
 
//======
// Snippet
//======
$flag = false;
$ext = array( '.jpg' , '.gif' , '.png' );
for( $i = 0; count( $ext ) > $i; $i++ )
{
     if( file_exists( $directory . $wtlf . $ext[$i] ) )
     {
          $flag = true;
          $name = $wtlf . $ext[$i];
     }
}
 
if( $flag == true )
{
     echo 'found file!';
     //echo $name;
}
?>
koizumi Developer · 81 posts #3

thanks!gonna try that.

koizumi Developer · 81 posts #4

im a little lost.

<html>
<body>
<?php
//==========
// Configuration
//==========
$directory = '/localhost/wapsite/games/nokia_s60/folder-a/'; //trailing slash
$wtlf = 'i'; //what to look for
 
//======
// Snippet
//======
$flag = false;
$ext = array( '.jpg' , '.gif' , '.png' );
for( $i = 0; count( $ext ) > $i; $i++ )
{
     if( file_exists( $directory . $wtlf . $ext[$i] ) )
     {
          $flag = true;
          $name = $wtlf . $ext[$i];
     }
}
 
if( $flag == true )
{
     echo 'found file!';
     echo $name;
}
?>

</body>
</html>
rukiya Lead · 569 posts #5

Its working.

<?php
$directory = '/home/wapfuns/public_html/';
$wtlf = 'index'; //what to look for

$flag = false;
$ext = array( '.jpg' , '.gif' , '.png', '.php', '.html' );
for( $i = 0; count( $ext ) > $i; $i++ )
{
     if( file_exists( $directory . $wtlf . $ext[$i] ) )
     {
          $flag = true;
          $name .= $wtlf . $ext[$i];
     }
}
 
if($flag == true)
{
     echo 'found file!<br/>';
     echo $name;
}
else 
{
    echo "file not found.";

}
?>

result is

found file! index.phpindex.html

Use

<? 
echo __FILE__; 
?>

to get file's path.

koizumi Developer · 81 posts #6

i still have to try that. thankz a lot!ü

koizumi Developer · 81 posts #8

ok its working. bot how can I add a function to fetch the link of the searched file?

robzky Developer · 205 posts #10

hmmm i dont know if how to use this script... hehehehe.. lol..

LESS TALK. LESS MISTAKE.

HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close