• PHP Tools Misc Tools
  • Which web search program can search for lines of code in .php files in web directory?

Hello.

Which web search program can search for specific lines of code in web directory? It would need to include searching all of the files (.php, .htm, .html, .txt, .inc, etc.) to find where certain files are called e.g. via 'require_once' statements, etc.

Indexing would be via shell.

I would keep this in a password-protected subdirectory. This is for Unix.

Thanks in advance.

    normally most web search programs will either ignore php files or index them from their URL (so php code isnt visible)...

    if you have shell/ssh access to your account, you can use unix/linux commands like find, grep etc to your advantage. else you may also invoke those from a php script using the [man]system/man or [man]exec/man function, grab their output and display on webpage...

      Note that incase you need stderr to stdout redirection you will have to append
      2>&1
      part at the end of your command.

        Thanks for your reply, jayant.

        I found the ideal software by 'interactivetools.com' (http://www.interactivetools.com) called, 'Search Engine'.

        I purchased it. It's great! It will find lines of code VERBATIM!!! If you're looking for e.g. all of files where 'file.php' is called, it will list them. If you're looking for where 'fcn()' is used, it will list all of the files. You don't have to deal with 'escaping' characters or anything! Just add 'php' (or cgi, etc.) in the list of file types in the admin area and it will search them!

        Because the search is performed via a browser, you can't click on the found file(s) to see the code of course, but who cares! I can click on the file in my ftp program and load the file in my editor just as easily!

        Their 'LIVE' support is the ULTIMATE!!!! See their website for details.

        I strongly recommend putting it in a password-protected subdir if you use it this way. I store it outside of my cgi-bin folder and use an .htaccess file that contains the line, 'Options +ExecCGI' (Unix) so it acts as if it is an executable in the cgi-bin folder.

        For any coder, this should be a 'MUST HAVE' COOL software program! 🆒

        Take care and thanks again!

          6 days later
          sherry wrote:

          Thanks for your reply, jayant.

          I found the ideal software by 'interactivetools.com' (http://www.interactivetools.com) called, 'Search Engine'.

          I purchased it. It's great! It will find lines of code VERBATIM!!! If you're looking for e.g. all of files where 'file.php' is called, it will list them. If you're looking for where 'fcn()' is used, it will list all of the files. You don't have to deal with 'escaping' characters or anything! Just add 'php' (or cgi, etc.) in the list of file types in the admin area and it will search them!

          Because the search is performed via a browser, you can't click on the found file(s) to see the code of course, but who cares! I can click on the file in my ftp program and load the file in my editor just as easily!

          Their 'LIVE' support is the ULTIMATE!!!! See their website for details.

          I strongly recommend putting it in a password-protected subdir if you use it this way. I store it outside of my cgi-bin folder and use an .htaccess file that contains the line, 'Options +ExecCGI' (Unix) so it acts as if it is an executable in the cgi-bin folder.

          For any coder, this should be a 'MUST HAVE' COOL software program! 🆒

          Take care and thanks again!

          Are you on a back hander by any chance? :eek:

            Write a Reply...