TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 05-19-2010, 05:18 AM   #1 (permalink)
The Visitor
 
Join Date: May 2010
Posts: 2
Thanks: 2
jac4b is on a distinguished road
Default search for a string through multiple php documents

Howdy, can anyone tell me how to search for a string through multiple php documents?

For example I see text I'd like to change in osCommerce but I can't seem to find it.

Also, is there an easier way to see the structure of all the nested phps besides reading through each one and finding all the includes?
jac4b is offline  
Reply With Quote
Old 05-19-2010, 06:06 AM   #2 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by jac4b View Post
Howdy, can anyone tell me how to search for a string through multiple php documents?

For example I see text I'd like to change in osCommerce but I can't seem to find it.

Also, is there an easier way to see the structure of all the nested phps besides reading through each one and finding all the includes?
Do you need to create a script or are you looking for a tool? I use a program called agent ransack for mass searches, it's extremely fast.
__________________

Village Idiot is offline  
Reply With Quote
The Following User Says Thank You to Village Idiot For This Useful Post:
jac4b (05-19-2010)
Old 05-19-2010, 06:52 AM   #3 (permalink)
The Wanderer
 
Join Date: Sep 2009
Posts: 10
Thanks: 2
khr2003 is on a distinguished road
Default

I always use notepad++ for this purpose. Go to search, then find in files.
It has three modes of search:
normal - just a normal search
extended (\n,\r,\t ...) - use special charcters such as line break, tab space .. etc.
Regular expression - use regular expression to find what you are looking for.

Program website:
http://notepad-plus.sourceforge.net/uk/site.htm
__________________
my new, free and opensource cms:
http://www.diy-cms.com
khr2003 is offline  
Reply With Quote
The Following User Says Thank You to khr2003 For This Useful Post:
jac4b (05-19-2010)
Old 05-19-2010, 08:05 AM   #4 (permalink)
The Visitor
 
Join Date: May 2010
Posts: 2
Thanks: 2
jac4b is on a distinguished road
Default

Thanks but i'm on a Mac.

TexFinderX seems to work.
http://sw.ixoft.com/texfinder.html
jac4b is offline  
Reply With Quote
Old 05-19-2010, 03:42 PM   #5 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

Dreamweaver is pretty cheap and *extremely* powerful. Komodo or Netbeans are free, but since I don't work on a Mac I can't attest to their features.
delayedinsanity is offline  
Reply With Quote
Old 05-19-2010, 05:36 PM   #6 (permalink)
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default

if you have shell access you could always use

grep -rl "text to find"

that will look at files in the current and sub directories and give you the file name and the line of text containing the text string...

Think about this a bit more, if it's s string replacement you could use sed...

sed -i 's/foo/foo_bar/g' *.php

* -i = edit the file "in-place": sed will directly modify the file if it finds anything to replace
* s = substitute the following text
* foo = the text string to be substituted
* foo_bar = the replacement string
* g = global, match all occurrences in the line


you need to be sure that the string your are searching for is unique !
__________________
Thanks... Simon

Sex, Drugs & Linux Rules

Last edited by maeltar : 05-19-2010 at 05:41 PM. Reason: typo's
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Mail - Help sending multiple attachments xperience Absolute Beginners 5 09-06-2010 08:27 AM
Search Engine query string archive? delayedinsanity The Lounge 0 11-15-2009 07:53 PM
Search query multiple tables? (PHP, MySQL) shoaibmunir General 6 06-16-2009 01:47 PM
PHP Compressor Kalle Script Giveaway 8 05-28-2008 12:14 AM


All times are GMT. The time now is 07:16 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design