File Search In Wap Buddy Script...

Started on the old forum in September 2006 · view the original in the archive · old links redirect here

19 replies · 2,536 views · started 20 years ago · 1 min read

TL;DR · summary of 19 replies
  • search.php was provided within the code snippet for use with wap buddy script.
  • The confusion about where to add the search functionality is resolved, as subzero suggests adding it in a specific part of the wap buddy script.
  • There are disputes over who created certain parts of the original scripts, leading to unresolved issues regarding copyright and attribution.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

5 participants
subzero Super moderator Fellow · 3,954 posts #2
?php
header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
\"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
echo "\n";

echo "<wml>";
echo "<head>
<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
</head>"; 
echo "<card newcontext=\"true\" title=\"search\">";
echo "<p mode=\"nowrap\">\n";
echo "[size="1"]\n";

function search($target, $directory){

   if(is_dir($directory)){
       $direc = opendir($directory);
       while(false !== ($file = readdir($direc))){

           if($file !="." && $file != ".."){

               if(is_file($directory."/".$file)){
                   if(preg_match("/$target/i", $file)){

$size = round(filesize($directory."/".$file)/1024,1);
$rev = strrev ($file);
$exp = explode (".", $rev);
$true = strrev ($exp[0]);
$trueext = strtolower ($true);
if ($trueext=="zip" OR $trueext=="rar" OR $trueext=="gz" OR $trueext=="wav" OR $trueext=="bmp" OR $trueext=="mid" OR $trueext=="midi" OR $trueext=="sis" OR $trueext=="bmp" OR $trueext=="wbmp" OR $trueext=="mmf" OR $trueext=="png" OR $trueext=="jar" OR $trueext=="jad" OR $trueext=="exe" OR $trueext=="doc" OR $trueext=="mp3" OR $trueext=="mp4" OR $trueext=="3gp" OR $trueext=="avi" OR $trueext=="gif" OR $trueext=="jpg" OR $trueext=="jpeg" OR $trueext=="nth" OR $trueext=="thm" OR $trueext=="amr"){                                           

echo "»<a href=\"$directory/$file\">$file ($size KB)</a>
";}
                                       }
               }else if(is_dir($directory."/".$file)){
                   search($target,$directory."/".$file);

               }

           }
       }
       closedir($direc);
   }

   return;
}

echo "[b]Search Results: [/b]$search
---
";
search("$search", "./");

echo "---
[/size][size="1"]Search again:[/size]

<input title=\"SEARCH:\" emptyok=\"true\" name=\"q\"/>
[size="1"]
<a href=\"search.php?search=$(q)\">Search Files</a>
";
echo "---
<a href=\"http://topsite.6te.net\">TOP-SITE</a>
---
© TOP-SITE 2006-2007";
echo "[/size]\n";
echo "</p>";
echo "</card>";
echo "</wml>";
?>

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

LankaZone #3

thanks buddy..But How can I add above script to the bellow wap buddy script..

<? header("Content-type: text/vnd.wap.wml"); echo "<?xml version=\"1.0\"?>";

echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

include("../wapbuddy_settings.php"); if (!isset($page)) {$page = 0;} $total = 0;

if(!($dp = opendir("./"))) die ("Cannot open ./"); $file_array = array(); while ($file = readdir ($dp)) { if(substr($file,0,1) != '.' and $file != "index.php") { $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); ?> <wml> <card id="card1" title="<? echo $conf["site_name"] ?>">

	<do type="option" label="Home"><go href="../index.php"/></do>
	<? echo "<a href=\"../index.php\">Home</a>

"; ?> <?

	if ($file_count > 0)
		{
		$first_record = $page * $conf["items_per_page"];
		$last_record = $first_record + $conf["items_per_page"];
		
		while (list($fileIndexValue, $file_name) = each ($file_array))
			{
			
			if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
				{
		
				echo "<a href=\"$file_name\">$file_name</a> (". round(filesize($file_name)/1024,1) . "kb)

"; $total = $total + filesize($file_name); } }

		if (($file_count > 0) AND ($page != 0))
			{
			// previous button
			$prev_page = $page -1;
			echo "

<a href="".$_SERVER["PHP_SELF"]."?page=$prev_page">Prev</a> "; }

		if (($file_count > 0) AND ($last_record < $file_count))
			{
			// next button
			$next_page = $page + 1;
			echo "

<a href="".$_SERVER["PHP_SELF"]."?page=$next_page">Next</a> "; } echo " Directory: $file_count "; if ($file_count == 1) {echo "file";} else {echo "files";}

		echo " (" . round($total/1024,1) . "kb)";
		echo "

<a href="../index.php">Home</a>"; } closedir($dp); ?>

</card> </wml>

I saw wappy has added file search on his wap buddy script at http://cult.trap17.com Help me to create this script./Or give me a wap file search script..Hard Style,wappy plz help..External image (may be gone)

Please reply W A P P YYYYYYYYYYYYYYY!!!Help me bro..

subzero Super moderator Fellow · 3,954 posts #4

it will work like that try it on same part

<?
header("Content-type: text/vnd.wap.wml"); 
echo "<?xml version=\"1.0\"?>"; 
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; 

include("../wapbuddy_settings.php");
if (!isset($page)) {$page = 0;}
$total = 0;

if(!($dp = opendir("./"))) die ("Cannot open ./");
$file_array = array(); 
while ($file = readdir ($dp))
{
if(substr($file,0,1) != '.' and $file != "index.php" and $file != "search.php")
{
$file_array[] = $file;
}
}
$file_count = count ($file_array);
sort ($file_array);
?> 
<wml> 
<card id="card1" title="<? echo $conf["site_name"] ?>"> 
<p mode="nowrap">
<do type="option" label="Home"><go href="../index.php"/></do>
<? echo "<a href=\"../index.php\">Home</a>

"; ?>
<?

if ($file_count > 0)
{
$first_record = $page * $conf["items_per_page"];
$last_record = $first_record + $conf["items_per_page"];

while (list($fileIndexValue, $file_name) = each ($file_array))
{

if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
{

echo "<a href=\"$file_name\">$file_name</a> (". round(filesize($file_name)/1024,1) . "kb)
";
$total = $total + filesize($file_name);
}
}

if (($file_count > 0) AND ($page != 0))
{
// previous button
$prev_page = $page -1;
echo "
<a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Prev</a>
";
}

if (($file_count > 0) AND ($last_record < $file_count))
{
// next button
$next_page = $page + 1;
echo "
<a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next</a>
";
}
echo "
Directory:
$file_count ";
if ($file_count == 1)
{echo "file";}
else
{echo "files";}

echo " (" . round($total/1024,1) . "kb)";
echo "
<a href=\"../index.php\">Home</a>";
}
closedir($dp);
?>

[size="1"]Search for FREE files:[/size]

<input title="SEARCH:" emptyok="true" name="q"/>
[size="1"]
[url="search.php?search=$(q)"]SEARCH[/url][/size]

page: $page
Pick a page
[b]To[/b]
[b]0-44434[/b]
<input type="text" name="page" title="1-34 pages only" maxlength="20" size="03" value=""/>[size="1"]

<anchor><go href="index.php" method="post"><postfield name="page" value="$(page)"/></go>[page]</anchor>[/size]

</p>
</card> 
</wml>

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

lamar-wap #5

can someone post the wapbuddy script so i can add that code in it please?

i want the updated version of wapbuddy or the latest on please.........................

subzero Super moderator Fellow · 3,954 posts #6

read my post lmao!!!!!!

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

LankaZone #7

read my post lmao!!!!!!

But whats search.php? Confused..

subzero Super moderator Fellow · 3,954 posts #8
<?php
header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
\"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
echo "\n";

echo "<wml>";
echo "<head>
<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
</head>"; 
echo "<card newcontext=\"true\" title=\"search\">";
echo "<p mode=\"nowrap\">\n";
echo "[size="1"]\n";

function search($target, $directory){

   if(is_dir($directory)){
       $direc = opendir($directory);
       while(false !== ($file = readdir($direc))){

           if($file !="." && $file != ".."){

               if(is_file($directory."/".$file)){
                   if(preg_match("/$target/i", $file)){

$size = round(filesize($directory."/".$file)/1024,1);
$rev = strrev ($file);
$exp = explode (".", $rev);
$true = strrev ($exp[0]);
$trueext = strtolower ($true);
if ($trueext=="zip" OR $trueext=="rar" OR $trueext=="gz" OR $trueext=="wav" OR $trueext=="bmp" OR $trueext=="mid" OR $trueext=="midi" OR $trueext=="sis" OR $trueext=="bmp" OR $trueext=="wbmp" OR $trueext=="mmf" OR $trueext=="png" OR $trueext=="jar" OR $trueext=="jad" OR $trueext=="exe" OR $trueext=="doc" OR $trueext=="mp3" OR $trueext=="mp4" OR $trueext=="3gp" OR $trueext=="avi" OR $trueext=="gif" OR $trueext=="jpg" OR $trueext=="jpeg" OR $trueext=="nth" OR $trueext=="thm" OR $trueext=="amr"){                                           

echo "?<a href=\"$directory/$file\">$file ($size KB)</a>
";}
                                       }
               }else if(is_dir($directory."/".$file)){
                   search($target,$directory."/".$file);

               }

           }
       }
       closedir($direc);
   }

   return;
}

echo "[b]Search Results: [/b]$search
---
";
search("$search", "./");

echo "---
[/size][size="1"]Search again:[/size]

<input title=\"SEARCH:\" emptyok=\"true\" name=\"q\"/>
[size="1"]
<a href=\"search.php?search=$(q)\">Search Files</a>
";
echo "---
<a href=\"http://topsite.6te.net\">TOP-SITE</a>
---
? TOP-SITE 2006-2007";
echo "[/size]\n";
echo "</p>";
echo "</card>";
echo "</wml>";
?>

^^^ search.php

<?
header("Content-type: text/vnd.wap.wml"); 
echo "<?xml version=\"1.0\"?>"; 
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; 

include("../wapbuddy_settings.php");
if (!isset($page)) {$page = 0;}
$total = 0;

if(!($dp = opendir("./"))) die ("Cannot open ./");
$file_array = array(); 
while ($file = readdir ($dp))
{
if(substr($file,0,1) != '.' and $file != "index.php" and $file != "search.php")
{
$file_array[] = $file;
}
}
$file_count = count ($file_array);
sort ($file_array);
?> 
<wml> 
<card id="card1" title="<? echo $conf["site_name"] ?>"> 
<p mode="nowrap">
<do type="option" label="Home"><go href="../index.php"/></do>
<? echo "<a href=\"../index.php\">Home</a>

"; ?>
<?

if ($file_count > 0)
{
$first_record = $page * $conf["items_per_page"];
$last_record = $first_record + $conf["items_per_page"];

while (list($fileIndexValue, $file_name) = each ($file_array))
{

if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
{

echo "<a href=\"$file_name\">$file_name</a> (". round(filesize($file_name)/1024,1) . "kb)
";
$total = $total + filesize($file_name);
}
}

if (($file_count > 0) AND ($page != 0))
{
// previous button
$prev_page = $page -1;
echo "
<a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Prev</a>
";
}

if (($file_count > 0) AND ($last_record < $file_count))
{
// next button
$next_page = $page + 1;
echo "
<a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next</a>
";
}
echo "
Directory:
$file_count ";
if ($file_count == 1)
{echo "file";}
else
{echo "files";}

echo " (" . round($total/1024,1) . "kb)";
echo "
<a href=\"../index.php\">Home</a>";
}
closedir($dp);
?>

[size="1"]Search for FREE files:[/size]

<input title="SEARCH:" emptyok="true" name="q"/>
[size="1"]
[url="search.php?search=$(q)"]SEARCH[/url][/size]

page: $page
Pick a page
[b]To[/b]
[b]0-44434[/b]
<input type="text" name="page" title="1-34 pages only" maxlength="20" size="03" value=""/>[size="1"]

<anchor><go href="index.php" method="post"><postfield name="page" value="$(page)"/></go>[page]</anchor>[/size]

</p>
</card> 
</wml>

^^^^^ wap buddy script with search :!:

::::::::::::::::::::::::::::::::::::::: ::hahaha copyright no one!:: :: :: :::::::::::::::::::::::::::::::::::::::

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

lamar-wap #9

lol subzero i just needed the script cuz i dont think i got it anymore.......................but lol i search and found it....................

Guest #10

Subzero that is my page my code. Now stop going round saying i copy you when you clearly copy me you dick. If anyone wants any of my scripts email me at admin@hack.s-60.org i would of posted them all here but idiots like subzero and chatz etc just copy and paste and try and claim it all as their work when clearly its mine. And sub zero that download script does have copyright under a limited general public license or LGPL to ME as i created it. If you want a proper example of the file search see php.net or look in my updated community script found in this scripts forum it is used on that.. God i remember why i don't use this site everytime i visit you bunch of cock's lol

Infact from now on i think i will start putting backdoors and malicious code in my scripts from now on.. See how ya all like that ya sad fucker's. I will give out all my scripts for free so why ya all trying to steal and copy? You people ruin this site and stop decent users wanting to visit here. Bollox site this is. Not cos of the script i use this forum script myself. Its the retarded users. Fucking grow up you sado's.

cityboy #11

How to short file by size,name n date in this script?

hardstyle Developer · 154 posts #12

wapbuddy was written by john roig lol

8th wonder of the world

chatabox Senior · 361 posts #13
?php
header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
\"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
echo "\n";
echo "<wml>";
echo "<head>
<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
</head>"; 
echo "<card newcontext=\"true\" title=\"search\">";
echo "<p mode=\"nowrap\">\n";
echo "\n";

function search($target, $directory){

   if(is_dir($directory)){
    $direc = opendir($directory);
    while(false !== ($file = readdir($direc))){

     if($file !="." && $file != ".."){

      if(is_file($directory."/".$file)){
       if(preg_match("/$target/i", $file)){

$size = round(filesize($directory."/".$file)/1024,1);
$rev = strrev ($file);
$exp = explode (".", $rev);
$true = strrev ($exp[0]);
$trueext = strtolower ($true);
if ($trueext=="zip" OR $trueext=="rar" OR $trueext=="gz" OR $trueext=="wav" OR $trueext=="bmp" OR $trueext=="mid" OR $trueext=="midi" OR $trueext=="sis" OR $trueext=="bmp" OR $trueext=="wbmp" OR $trueext=="mmf" OR $trueext=="png" OR $trueext=="jar" OR $trueext=="jad" OR $trueext=="exe" OR $trueext=="doc" OR $trueext=="mp3" OR $trueext=="mp4" OR $trueext=="3gp" OR $trueext=="avi" OR $trueext=="gif" OR $trueext=="jpg" OR $trueext=="jpeg" OR $trueext=="nth" OR $trueext=="thm" OR $trueext=="amr"){             

echo "»<a href=\"$directory/$file\">$file ($size KB)</a>
";}
            }
      }else if(is_dir($directory."/".$file)){
       search($target,$directory."/".$file);

      }

     }
    }
    closedir($direc);
   }

   return;
}
echo "Search Results: $search
---
";
search("$search", "./");
echo "---
Search again:

<input title=\"SEARCH:\" emptyok=\"true\" name=\"q\"/>

<a href=\"search.php?search=$(q)\">Search Files</a>
";
echo "---
<a href=\"http://topsite.6te.net\">TOP-SITE</a>
---
© TOP-SITE 2006-2007";
echo "\n";
echo "</p>";
echo "</card>";
echo "</wml>";
?>

mmm there we go.. YOU DO ALONE MY WORK NOW STOP SAYING YOU DO. I WROTE THAT PAGE WITH THE SEARCH AND THE FILE EXTENSION CODE, YOU EVEN PUT YOUR OWN COPYRIGHT ON MY WORK YOU SAD LITTLE MAN, ALSO HAVE ALL THE ICONS AND UPDATED COPY'S. If anyone wants help with code i (wappy) have writen mail me at admin@hack.s-60.org

neostar Developer · 109 posts #14

where is wapbuddy_settings.php file?

chatabox Senior · 361 posts #15

I removed it. As i keep saying i updated it alot. If you want help with it or better version (that works on all servers unlike the one mr copycat posted) visit my site. Lol

subzero Super moderator Fellow · 3,954 posts #16

copycat blah is that you wappy 😂 External image (may be gone)

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

chatabox Senior · 361 posts #17

Er.. No subzero. Its clearly you eh. Sad little man, as you fully know it was my page you posted. If you so dumb that you really think people believe your lies/tales your even more stupid than i thought. Wanker.

subzero Super moderator Fellow · 3,954 posts #18

i thouht it be you wappy you clone more then others

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

chatabox Senior · 361 posts #19

Aw how cute? Coming from someone that copied my .wml about page and even left my spelling mistakes in it. Roflmfao.. Your plans to annoy me really don't work you italian spaghetti eating fool.

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