Hi,

I have a problem. I'm working on one project.
I want to find file which contains site logo words.
Ftp has a tone of files, so I can't search file by file.

I guess there is no way to get content of .php file in string?
So I can set it in loop and compare content of all files with related words.

Is there any tool which I can use for this?

Thanks in advance,

Amer

I don't know if there's anything that can search the server. But if you download everything, Adobe Dreamweaver has a very handy tool called "find and replace" that will search through every single file.

<?php
    $url='Directory-to-search/';
    $handle = opendir ($url);

while (false !== ($file = readdir($handle))) {
if($file != ".." && $file !="." && $file != basename(__FILE__)) {

$scan = file_get_contents(__FILE__);

if(preg_match('/string/', $scan)){
echo 'File: '.$url.$file.' Found.';
}

}
}
?>

Thank you very much MagicMedia.

Does anybody know how to show folders with names .html etc on ftp.
This foldersare not normally shown (because folder name is html extension).

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.