hello guys i have search a lot, and iam trying to make that working. The following script searches recursive for the files into all folders.
if(isset($_POST['cmdsearch']))
{
$search = $_POST['search'];
    if (@get_magic_quotes_gpc())
    {
    $search = stripslashes($search);
    }
$it = new RecursiveDirectoryIterator("jpg");
foreach(new RecursiveIteratorIterator($it) as $file) 
    {
       if (false !== stripos($file, $search))
       {
       echo "<a style='padding:10px 10px 5px 5px; text-decoration:none; line-height:15px;' class='smamal' target='_blank' href='http://www.domain.com/files/";
       echo $file;
       echo "'>";
       echo "www.domain.gr/files/";
       echo $file;
       echo "</a>";
       echo "<br />";
       }
   }  
}
else
{
echo "<p></p>";
}
WHAT I WANT TO ADD:
- [Important] I want to search in files both for Upper & Lower Case letters. example: right now if you search for "Drink" it gives only "Drink" not "drink".
- Also if it is possible to search also for the 4 first letters of a given word example: search for "headphones" results= "headphones" "headline" "headless" etc...
i am trying to add into the code something like this
/\b([a-z]+[A-Z]+[a-zA-Z]*|[A-Z]+[a-z]+[a-zA-Z]*)\b/
thanks for your time.
 
    