Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Finding Form Code

Can't remember where I posted autoresponder subscription forms

8:03 pm on May 31, 2010 (gmt 0)

10+ Year Member

I have a gazillion web pages and a half-zillion autoresponder series with forms spread all over a bunch of websites.

I would like to organize and systemitize my autoresponders, deleting the ones I want to abandon, and revamping the ones that are producing.

Since I was stoopid and didn't use tracking tags efficiently, I don't know which page has which form where subscribers sign up for which newsletter.

Is there a way to do an online search for the form "action" that will allow me to identify the pages where the forms are and at least reduce my meanderings to something sizable?

I can't find a google search operator or term that works.

Any help will be appreciated.

1:34 pm on Jun 1, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

You're right, you can't use a search engine to search for <html> code. (At least none that I know of.) You'll need to write a script (e.g., Perl or PHP) to search through the files on your server.
2:13 pm on Jun 1, 2010 (gmt 0)

10+ Year Member

Thanks Michael,

Yep. Spent yesterday downloading most of the websites and am going to use a text string search app to go through the files and identify the location for me. Then do the changes and learn a big lesson. LOL.

Thanks again,
6:11 am on Jun 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

You don't have to download the files, you can run a script directly on your server. Here's a Perl script I use (in a password-protected directory).


print "Content-type:text/html\n\n";

$textToFind = "<form";
undef $\;
use File::Find;
find(\&processFiles, "/home/user/example.com/");

sub processFiles {
$filename= "$File::Find::name";
if ($filename =~/\.(html|txt|php|cgi|pl)$/) {
open (FILE, "<$filename");
$file = <FILE>;
close (FILE);

if ($file =~/\Q$textToFind\E/si) { print "$filename<BR>"; last;}

Just create a file called something like "find.pl", put the above code into it, set the file's permissions to 755 with chmod, and then run it from a web browser (e.g., http://example.com/find.pl).

Google "chmod 755" if you don't know about file permissions.
11:53 am on Jun 2, 2010 (gmt 0)

10+ Year Member

Thanks Michael,

I isn't an coder, so I couldn't have thunk of that ... especially in Perl! PHP I can halfway read, but Perl and Regex is like being a "Stranger in a strange land" to me.

Thanks again.

Featured Threads

Hot Threads This Week

Hot Threads This Month