I'm looking for a way to capture the raw URL-encoded string from which $_POST variables come (complete with ampersands, hex numbers, etc.) (I need this in order to visually check the validity of PayPal IPNs being sent to my handler code.)
Is there a function to capture this as a string ?
Thanx ! Glenn
How do I capture the raw URL-string $_POST data ?
Moderator: General Moderators
-
FeralReason
- Forum Newbie
- Posts: 7
- Joined: Mon Apr 20, 2009 11:05 pm
Re: How do I capture the raw URL-string $_POST data ?
use var_dump($_POST)
-
FeralReason
- Forum Newbie
- Posts: 7
- Joined: Mon Apr 20, 2009 11:05 pm
Re: How do I capture the raw URL-string $_POST data ?
Thanx much el_gato - will use this if I can't find any other solution.
However, this dumps the data after processing it into an array and I am looking for a way to capture the raw URL-encoded string before this happens -- with ampersands intact (as field=value seperators), %FF type hex numbers (in lieu of special characters like @, ',', ';'), '+'s in lieu of spaces, etc.
I want to visually check the actual URL-encoded string that PayPal is sending me.
(Appreciate your reply tho, this was a function I was unfamiliar with.)
However, this dumps the data after processing it into an array and I am looking for a way to capture the raw URL-encoded string before this happens -- with ampersands intact (as field=value seperators), %FF type hex numbers (in lieu of special characters like @, ',', ';'), '+'s in lieu of spaces, etc.
I want to visually check the actual URL-encoded string that PayPal is sending me.
(Appreciate your reply tho, this was a function I was unfamiliar with.)
Re: How do I capture the raw URL-string $_POST data ?
Yeah i see, try use:
that will print raw post data as explained here
Or in another way using Firefox addon LIVE HTTP HEADRS to view live HTTP headers.
Code: Select all
echo file_get_contents('php://input');
Or in another way using Firefox addon LIVE HTTP HEADRS to view live HTTP headers.
-
FeralReason
- Forum Newbie
- Posts: 7
- Joined: Mon Apr 20, 2009 11:05 pm
Re: How do I capture the raw URL-string $_POST data ?
Hey -- almost perfect !
The only odd thing I see is that the @ sign is displayed as '@' instead of %40.
However -- I think this is close enough for horseshoes and hand grenades !
Thanx much for your help !
Glenn
The only odd thing I see is that the @ sign is displayed as '@' instead of %40.
However -- I think this is close enough for horseshoes and hand grenades !
Thanx much for your help !
Glenn
-
FeralReason
- Forum Newbie
- Posts: 7
- Joined: Mon Apr 20, 2009 11:05 pm
Re: How do I capture the raw URL-string $_POST data ?
Nope -- it works perfectly ! There was a problem with my ipnGenerator code.
Thanx again !!
Thanx again !!