0

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

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by aldm
0

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.

0
<?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.';
}

}
}
?>

Edited by mike_2000_17: Fixed formatting

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.