Spiderwap Script Help!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Spiderwap Script Help!

    hi
    Need help to add search engine in my site http://wap.mobifrendz.net/..
    thanks in advance.
    Code:
    <?php
    
    
    ?>
    <?php
    echo("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n");
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
    <head>
      <meta http-equiv="Cache-Control" content="no-cache"/>
      <meta http-equiv="Cache-Control" content="must-revalidate"/>
    <title>Free mobile downloads</title>
       <link rev="made" href="" />      
    <link rev="start" href="../../My Documents/mobifrendz/public_html/wap/." title="Home Page" />   
    <link rel="shortcut icon" type="image/x-icon" href="../../My Documents/mobifrendz/public_html/wap/img/ico.gif" />   
    <meta http-equiv="Cache-Control" content="must-revalidate" />   
    <meta http-equiv="Cache-Control" content="no-cache" />   
    <meta name="description" content="description" />   
    <meta name="keywords" content="adult mp3 movies 3gp tones videos walpapers & forums toplist services wapmasters" />
    
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head>
    <body>
    <div class="top">
    [img]img/logo.gif[/img]
    <div>
    [b][size="1"]<? $site_name ?>Mobi Downloads[/size][/b]</div>
    </div>
    
    [size="1"]The ultimate mobile entertainment portal [/size]!!
    
    
    
    [b][size="1"]
      <?php
    
    echo "<img src=\"../img/a.gif\" alt=\"*\"/> <a href=\"movies/index.php\">*Movies*</a>
    ";
    echo "<img src=\"../img/a.gif\" alt=\"*\"/> <a href=\"videos/index.php\">*Videos*</a>
    ";
    echo "<img src=\"../img/a.gif\" alt=\"*\"/> <a href=\"mp3/index.php\">*mp3&#39;s*</a>
    ";
    echo "<img src=\"../img/a.gif\" alt=\"*\"/> <a href=\"softwares/index.php\">*software&#39;s*</a>
    ";
    echo "<img src=\"../img/a.gif\" alt=\"*\"/> <a href=\"tones/index.php\">*Tones*</a>
    ";
    echo "<img src=\"../img/a.gif\" alt=\"*\"/> <a href=\"wallpapers/index.php\">*Wallpapers*</a>
    ";
    
    ?>
    <form action="/cgi-sys/entropysearch.cgi" target=searchwindow>
    Search Query <input type="text" name="query" value="">
    <input type="hidden" name="user" value="huma">
    <input type="hidden" name="basehref" value="http://mobifrendz.net">
    <input type="hidden" name="template" value="default">
    <input type="submit" value="Search">
    </form>
      [/size][/b]</p>
    <div class="foot">
    [url="www.mobifrendz.org"]Vist our Forum[/url]
    
    <div>
    © <? $site_name ?>2008-Mobifrendz Community</div>  
    </div>
    </body>
    </html>
    
    <?php

    #2
    what kind of search engine do want?

    Comment


      #3
      pls vist my site,,i want search engine in each n every page.
      thx@rukia

      Comment


        #4
        i visited it already,but now you need to explain what kind of search engine you want

        Comment


          #5
          i want to add file search in every section .
          this is section index code on my site

          Code:
          <?
          include("../wap_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) != &#39;.&#39; and $file != "index.php" and $file != "search.php")
          {
          $file_array[] = $file;
          }
          }
          $file_count = count ($file_array);
          sort ($file_array);
          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)<div></div>";
          $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_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=http://wap.mobifrendz.net/>Home</a>";
                      echo "
          <a href=\"../index.php\">Back</a>";
                      }
                  closedir($dp);
                  ?>
          
          <div class="foot">
          </small>[/b]
          
          
          <div>
          © <? $site_name ?>2008-Mobifrendz Community</div>  
          </div>
          </body>
          </html>
          <?
          need file search option..pls help

          Comment


            #6
            here is a code that will search file in a directory. modify it for you script
            Code:
            <?php
            $ac = $_GET["ac"];
            if($ac=="a")
            {
            $directory = &#39;/var/www/&#39;; //Mention the correct pathway of the diretory
            $filename = $_POST["filename"]; //what to look for
            $flag = false;
            $ext = array( &#39;.jpg&#39; , &#39;.gif&#39; , &#39;.png&#39; , &#39;.mp3&#39; , &#39;.wav&#39; ,&#39;.mid&#39; ,&#39;.3gp&#39; ,&#39;.mpg&#39; ,&#39;.sis&#39; ,&#39;.jar&#39; ,&#39;.jad&#39; ,&#39;.mmf&#39; ,&#39;.nth&#39; ,&#39;.avi&#39;,&#39;.wmv&#39;);
            for( $i = 0; count( $ext ) > $i; $i++ )
            {
                 if( file_exists( $directory . $filename . $ext[$i] ) )
                 {
                      $flag = true;
                      $name = $filename . $ext[$i];
                 }
            }
            
            if( $flag == true )
            {
                 echo &#39;found file!&#39;;
                 echo $name;
            }
            else 
            { 
                 echo &#39;cannot found $name&#39;;
            }
            }
            ?>
            <?php
            header("Content-type: text/vnd.wap.wml");
            header("Cache-Control: no-store, no-cache, must-revalidate");
            echo "<?xml version=\"1.0\"?>";
            echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
            ?>
            <wml>
            <?php
              echo "<card id=\"main\" title=\"Search\">";
              echo "<p align=\"center\">";
              echo "<input name=\"filename\" maxlength=\"30\"/>
            ";
              echo "<anchor>Search<go href=\"search.php?ac=a\" method=\"post\">";
              echo "<postfield name=\"filename\" value=\"$(filename)\"/>";
              echo "</go></anchor>
            ";
            echo "</p></card>";
            ?>
            </wml>

            Comment

            Working...
            X