in reply to get name field from paypal ipn

What does the input (the email) look like?

Replies are listed 'Best First'.
Re^2: get name field from paypal ipn
by Anonymous Monk on May 20, 2009 at 12:52 UTC
      here's how (replace '01' with 'first_name'):
      $_ = join q,,,map chr, 33 .. 126; print "$_\n"; print substr($_, index($_,'01'),64),"\n"; __END__
        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 = '';
        }
        }
        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