File Search Engine Like Rapidshare Search Script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sagacious
    New Member
    • Oct 2009
    • 8

    File Search Engine Like Rapidshare Search Script

    Hi There..

    Nice Site..

    I Want to add a File Search Engine For My Upload And Download Site..

    As Like As Rapidshare Search Engins..

    I Mean A Search System That Will Search Files From A Folder Of My Server where the files are Uploading by Users..

    Any One Have This Kinda Script , I will Greatful to Have it.. <email_remove d>
    Waiting For Reply..

    Thank You.
    Last edited by Dormilich; Oct 12 '09, 10:02 AM. Reason: email address removed
  • jotil420
    New Member
    • Oct 2009
    • 3

    #2
    file search engine like rapidshare search script

    Originally posted by sagacious
    Hi There..

    Nice Site..

    I Want to add a File Search Engine For My Upload And Download Site..

    As Like As Rapidshare Search Engins..

    I Mean A Search System That Will Search Files From A Folder Of My Server where the files are Uploading by Users..

    Any One Have This Kinda Script , I will Greatful to Have it.. <email_remove d>

    Waiting For Reply..

    Thank You.
    Me also need help on it.. any one here for help ???

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      if you have the files in a directory (and not in a DB) you can use glob().

      Comment

      • sagacious
        New Member
        • Oct 2009
        • 8

        #4
        my db and directory both contain the files but it doesn't works with google custom search though it counts the pages but i need a script for that as like as RapidShare Search Engines..

        Comment

        • Dormilich
          Recognized Expert Expert
          • Aug 2008
          • 8694

          #5
          u s e g l o b ( )

          _______________ _____

          Comment

          • sagacious
            New Member
            • Oct 2009
            • 8

            #6
            hmm.. i tried bt dosen't work.. is there any built in script do you have in your collection ?

            i need that for my site

            Comment

            • Dormilich
              Recognized Expert Expert
              • Aug 2008
              • 8694

              #7
              Originally posted by sagacious
              is there any built in script do you have in your collection ?
              nope, never used glob() before.

              Comment

              • sagacious
                New Member
                • Oct 2009
                • 8

                #8
                so can u guide me to pass through this ? is this possible to modify a rapid share search script to search through my file directory ?

                Comment

                • Dormilich
                  Recognized Expert Expert
                  • Aug 2008
                  • 8694

                  #9
                  read the comments of the glob() manual entry, what you look for is quite probably described there.

                  Comment

                  • trashcan
                    New Member
                    • Sep 2010
                    • 2

                    #10
                    using glob

                    hey, glob is kinda like a file/directory strpos(), cept i doesnt return false, ever.

                    just use it like this:

                    Code:
                    <?php
                    $mydir = 'dir/sub-dir';
                    $myext = '.htm';
                    foreach(glob("$mydir/*$myext") as $item) {
                      echo "<li>$item</li>";
                    }
                    ?>
                    try it, after changing to $mydir and $myext.

                    Comment

                    • trashcan
                      New Member
                      • Sep 2010
                      • 2

                      #11
                      searching...

                      if you want to search inside files for a word...
                      thats harder. a LOT harder.
                      but you can do it.
                      Code:
                      <?php
                      	$mydir = 'dir/sub-dir';
                      	$myext = '.htm';
                      	foreach(glob("$mydir/*$myext") as $item) {
                      		$inside = file_get_contents($item);
                      		$findme   = 'my text';
                      		$pos = strpos($inside, $findme);
                      
                      // Note our use of ===.  Simply == would not work as expected
                      // because the position of 'a' was the 0th (first) character.
                      if ($pos === false) {
                          echo "<!-- not found in $item -->";
                      } else {
                      	echo "<li><a href='$item'>$item</a></li>";
                      }
                      	}
                      ?>

                      Comment

                      Working...