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

How to do this--> Textarea frpm php to a txt

Discussion in 'Black Hat SEO Tools' started by TheMatrix, Oct 1, 2009.

  1. TheMatrix

    TheMatrix BANNED BANNED

    Joined:
    Dec 20, 2008
    Messages:
    3,444
    Likes Received:
    7,279
    Hey all

    I have made a php file which extracts emails from facebook. It shows emails on a new page, in a textarea.

    I want to ask, how can I automatically save results in a txt file when the emails are shown up.

    I mean this:

    I start script.--> 100 emails extracted--> Shown in box--> Saved in txt file like this:
    email1
    email2
    email3..


    I start script.--> 200 more emails extracted--> Shown in box--> Saved in txt file like this:

    email1
    email2
    email3
    email4
    email5
    email6..


    Please help me,,

    Thanks
     
  2. cyrix

    cyrix Junior Member

    Joined:
    Sep 19, 2008
    Messages:
    179
    Likes Received:
    61
    Occupation:
    Full Time Internet Marketer\Developer
    Location:
    United States
    since you wrote a base app already im assuming you know how to POST an html form to php.

    PHP:
    $emails $_REQUEST['textarea_name_here'];
    $file "txt_file.txt";

    if (
    $emails) {
       
    $handle fopen($file,'w');
       
    fwrite($handle,$emails);
       
    fclose($handle);
    } else {
       echo 
    "No emails entered";
    }

    that should do it, so create a form with a text area and a submit button, change the textarea name to match in the $_REQUEST and it should work, i haven't tested it but it should get you started.
     
  3. broco

    broco Newbie

    Joined:
    Jul 15, 2008
    Messages:
    42
    Likes Received:
    14
    PHP:
    $fp fopen($file'a');
    or
    $fp fopen($file'a+');
    Use a or a+ mode so the new email list will be appended to current file :)
     
  4. broco

    broco Newbie

    Joined:
    Jul 15, 2008
    Messages:
    42
    Likes Received:
    14
    PHP:
    $fp fopen($file'a');
    or
    $fp fopen($file'a+');
    Use a or a+ mode so the new email list will be appended to current file :)
     
  5. TheMatrix

    TheMatrix BANNED BANNED

    Joined:
    Dec 20, 2008
    Messages:
    3,444
    Likes Received:
    7,279
    @cyrix : Thanks for the code. But, I need it to be automatic. No need of any button.
     
  6. TheMatrix

    TheMatrix BANNED BANNED

    Joined:
    Dec 20, 2008
    Messages:
    3,444
    Likes Received:
    7,279
    @cyrix : Thanks for the code. But, I need it to be automatic. No need of any button.
     
  7. Jekashi

    Jekashi Regular Member

    Joined:
    Jul 9, 2009
    Messages:
    298
    Likes Received:
    146
    I'm not sure what you wrote your script in, but just add a subroutine to send an HTTP POST Request to your PHP page. That's all a button does anyway.