Reply
Newb Question: Email Harvester?
Old 01-14-2009, 03:54 AM Newb Question: Email Harvester?
Experienced Talker

Posts: 32
Trades: 0
I dont even know if Im in the right section, but I need a script that says something like "please enter email address to be informed of websites Grand Opening" and then there be a input field where viewers can input their email address and then it email it to my email. Or even better, it adds it to like a database or a list so then I can just copy and paste all the email addresses when im ready to email them all about the opening.
Any responses would be helpful, even if someone could better explain to me in proper terms what it is im asking for. Thanks alot.
rakoom2002 is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 01-14-2009, 04:37 AM Re: Newb Question: Email Harvester?
Banned

Posts: 922
Name: Geoff Vader
Location: In my dreams
Trades: 0
wrong terminology!

email harvester = script for crawling 1000s of web pages and immorally dragging email addresses out of them onto a list ready for spamming! all you need is a "mailing list" script.

apparently there's a lot of them on Google

Last edited by witnesstheday; 01-14-2009 at 04:40 AM..
witnesstheday is offline
Reply With Quote
View Public Profile
 
Old 01-14-2009, 09:04 AM Re: Newb Question: Email Harvester?
Mad182's Avatar
Experienced Talker

Posts: 41
Name: Madars
Location: Latvia
Trades: 0
Something like this:
Quote:
<?php
$filename = 'yourfile.txt'; //where to store data

if(isset($_POST['mail'])) {
$newcontent = htmlspecialchars(trim($_POST['mail']));
if(!empty($newcontent)) {
if (is_writable($filename)) {

if (!$handle = fopen($filename, 'a')) {
echo "Cannot open file ($filename)";
exit;
}
if (fwrite($handle, $newcontent."\n") === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "Thanks! You will be informed."; //success
fclose($handle);
} else {
echo 'Sorry, the file "' . $filename . '" is not writable';
}
}
}
?>
<form action="" method="post">
<p>Please enter email address to be informed of websites Grand Opening!</p>
<input type="text" name="mail" />
<input type="submit" value="Subscribe" />
</form>
__________________
There's no place like 127.0.0.1
latvian guitar chords | runescape community
Mad182 is offline
Reply With Quote
View Public Profile Visit Mad182's homepage!
 
Old 01-14-2009, 09:14 AM Re: Newb Question: Email Harvester?
Skilled Talker

Posts: 60
Name: Michael Swan
Location: United Kingdom
Trades: 0
Thanks for the script. Something good to see some nice PHP about forums these days. LOL...

I may take a look further into the script to see if i can make use of it.

~ Mike
ms2134 is offline
Reply With Quote
View Public Profile Visit ms2134's homepage!
 
Old 01-15-2009, 04:14 AM Re: Newb Question: Email Harvester?
Experienced Talker

Posts: 32
Trades: 0
Quote:
Originally Posted by Mad182 View Post
Something like this:
Thank you very for your code, I really appreciate it. I however seem to not be able to get ti wto work properly. I tried another script someonewhere on the forum and it is doing the same thing, or I should say "not" doing the same thing. It seems to be working on the website, okay, however when I go look at the txt file which it should be storing the information to, theres nothing there. I copied the php script to a .php file made a .txt for it to save the information to and then copied the html into my html code...

does the html code need to be referenced to the php file at all the link the two together?I know the php is linked to the txt file... I mean, how does the form know to use that specific php script. what if I had like three different php files in the same directory..

Last edited by rakoom2002; 01-15-2009 at 04:16 AM..
rakoom2002 is offline
Reply With Quote
View Public Profile
 
Old 01-15-2009, 02:12 PM Re: Newb Question: Email Harvester?
stevej's Avatar
Professional Multitasker

Posts: 991
Location: In a flying house
Trades: 0
If that's not working, here is something that might help you.

- Steve
stevej is offline
Reply With Quote
View Public Profile
 
Old 01-15-2009, 07:36 PM Re: Newb Question: Email Harvester?
anderswc's Avatar
Super Talker

Posts: 132
Name: Will Anderson
Location: Terre Haute, IN
Trades: 0
rakoom2002, in the <form> tag the "action" attribute tells the browser where to send the form results. By specifying an empty string, the browser knows to send it to the same page.

if you want the form to be on somefile.html and then have it sent to somefile.php, you'll need to adjust the form like this.

Code:
<form action="somefile.php" method="post">
__________________
Will Anderson
It's An Anderson | Twitter | Anderson Web Solutions
anderswc is offline
Reply With Quote
View Public Profile Visit anderswc's homepage!
 
Old 01-16-2009, 03:21 AM Re: Newb Question: Email Harvester?
Experienced Talker

Posts: 32
Trades: 0
One more quick question. There is a part of the php script that is called like success or something that prints "thank You for submitting email..." after the user has in fact submitted their email. Is there a way to style that, currently it is the same color as the background and aligned to the left of my page. Lol I tried putting a < div> tag around the success text to style it with css and it FREAKED out.

Ive tried everything I could think of, I tried putting a span tag around the whole php script, and almost variation of positions around the actual Thank You text itself.

Last edited by rakoom2002; 01-16-2009 at 03:34 AM..
rakoom2002 is offline
Reply With Quote
View Public Profile
 
Old 01-16-2009, 04:51 PM Re: Newb Question: Email Harvester?
Experienced Talker

Posts: 32
Trades: 0
is it even possible to style this sort of text?
rakoom2002 is offline
Reply With Quote
View Public Profile
 
Old 01-16-2009, 06:32 PM Re: Newb Question: Email Harvester?
stevej's Avatar
Professional Multitasker

Posts: 991
Location: In a flying house
Trades: 0
Oh, it's certainly possible. Did you try using the span tags like I suggested in that last thread? With css, you just gotta keep testing...

- Steve
stevej is offline
Reply With Quote
View Public Profile
 
Old 01-16-2009, 09:43 PM Re: Newb Question: Email Harvester?
Experienced Talker

Posts: 32
Trades: 0
Ya. I tried that. I tried both span and div tags in every position I could think of. around the entire php, around just the success text. I thought that the texts appearance may be affected by the styles of the body so I tried adding some css to affect the body's font style. nothing worked.
rakoom2002 is offline
Reply With Quote
View Public Profile
 
Old 01-18-2009, 05:40 AM Re: Newb Question: Email Harvester?
Mad182's Avatar
Experienced Talker

Posts: 41
Name: Madars
Location: Latvia
Trades: 0
My sample with HTML and CSS: http://paste.php.lv/ed633fbbb9f9f6b7...e052c76f/nonum
__________________
There's no place like 127.0.0.1
latvian guitar chords | runescape community

Last edited by Mad182; 01-18-2009 at 06:11 AM..
Mad182 is offline
Reply With Quote
View Public Profile Visit Mad182's homepage!
 
Old 01-20-2009, 02:20 PM Re: Newb Question: Email Harvester?
Experienced Talker

Posts: 32
Trades: 0
Thank You very much Mad. I appreciate all your help.
rakoom2002 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Newb Question: Email Harvester?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.16319 seconds with 13 queries