in reply to Re^2: get name field from paypal ipn
in thread get name field from paypal ipn

here's how (replace '01' with 'first_name'):
$_ = join q,,,map chr, 33 .. 126; print "$_\n"; print substr($_, index($_,'01'),64),"\n"; __END__

Replies are listed 'Best First'.
Re^4: get name field from paypal ipn
by Anonymous Monk on May 20, 2009 at 15:55 UTC
    thank you very much, like this?

    # check for name spaces

    $spos = index($thestr,' ');
    if($spos>=0) { $justmail = ''; } else { $justmail = 1; }

    #
    if($justmail ne 1){
    # get name
    $name = substr($thestr,0,$lbpos-14);

    $_ = join q,,,map chr, 33 .. 126;
    print "$_\n";
    print substr($_, index($_,'first_name'),64),"\n";
    __END__

    # strip quotes
    $name =~ s/\"//g;

    $spos = index($name,' ');
    if($spos>=0){
    $fn = substr($name,0,$spos);
    $ln = substr($name,$spos+1,length($name)-$spos-1);
    } else {
    $fn = $name; $ln = '';
    }
    }
Re^4: get name field from paypal ipn
by Anonymous Monk on May 21, 2009 at 08:01 UTC
    ok I tried this but just got an error, i have probably got something wrong or put the extra code in the wrong place. thanks
      use your head, you can't just copy/paste blindly