Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Text retrival

  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Text retrival

    Hello

    K, i'm seeking advice in finding a script to store anything sent to it, preferably text files.....ive searched all over the place, ive come across form handlers...ect..but not one that will store all text sent to it (like a database or whatever)...i'm well new at perl by the way...


    sub getCookies {

    local(@rawCookies) = split (/; /,$ENV{'HTTP_COOKIE'});
    local(%cookies);

    foreach(@rawCookies){
    ($key, $val) = split (/=/,$_);
    $cookies{$key} = $val;
    }

    return %cookies;
    }


    this is used for cookies is it not....how would i change it for text files ?

    thanks

  • #2
    Regular Coder Feyd's Avatar
    Join Date
    May 2002
    Location
    Los Angeles, CA Maxim: Subvert Society
    Posts
    404
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's a bit too complex to post code for you, so I'm just going to point you in the write directions:

    http://tech-concepts.com/scripts/
    http://www.ezscripting.com/scripts/csvform.html
    http://freeware.oveas.com/ofh/
    Moderator, Perl/CGI Forum
    shadowstorm.net - subvert society

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts
    if you just want info going to a txt file chuck this in your script
    open (FILE, ">>whatever.txt") || die "coundnt open file file";
    print FILE"stuff you want in it\n";
    and if you want to send stuff form a form use varibles like...
    print FILE "$name $email etc \n";
    remeber you need to declare the variables at the begining of the script.
    that help?
    sir p

  • #4
    New Coder
    Join Date
    Jun 2002
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes i'm getting their now....

    thanks for the help guys....

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts
    no prob..thats good to hear


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •