1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP script for Email list building?

Discussion in 'PHP & Perl' started by tomsko, Dec 5, 2012.

  1. tomsko

    tomsko Regular Member

    Joined:
    Nov 2, 2012
    Messages:
    460
    Likes Received:
    268
    Occupation:
    IM
    I bet that someone has made it already and it's probably very easy but I don't know that much about PHP to do it on my own.
    So I'm looking for a script that captures form submit value and saves it as a list in .txt file
    If it's possible to save more info like IP it'd be even better.

    This is for Email list building. I don't want to use getresponse or aweber or whatever to make my list. When it comes to mailing it's a different question.
    Maybe database would do a better job?
     
    Last edited: Dec 5, 2012
  2. tomsko

    tomsko Regular Member

    Joined:
    Nov 2, 2012
    Messages:
    460
    Likes Received:
    268
    Occupation:
    IM
    Found a script. Just in case anyone is looking

    <?php
    $fails = "list.txt";
    $valja = fopen($fails, 'a') or die("wtf");
    $dati = $_GET['epasts'] . "\n";
    if (fwrite($valja, $dati)) {
    echo "success";
    }
    else {
    echo "wtf";
    }


    ?>