Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP HTTP_POST_VARS problem

To start: I am a C++ developer who is roped into making a PHP script (for paypal IPN).

I have been incredibly frustrated witht he lack of good working samples from paypal and elsewhere.

The latest problem is that I seem to not get any of the $HTTP_POST_VARS items that I think I should be getting.

Some searches online seem to indicate that this is either deprecated or configurable, etc.

I have no idea what version of PHP is used at my host.

It seems clear that either my testing applications do not post correctly or the script is not working.

so: 2 questions: - Does anyone have any links to working IPN scripts? - What gives with the $HTTP_POST_VARS nonsense?

EDIT

thanks all. I'll try these suggestions out and post up my success story soon I hope.

like image 850
Tim Avatar asked Feb 26 '09 06:02

Tim


1 Answers

You can check what version of PHP you are using by typing phpinfo(); into a PHP script block <?php ?> and see what it ouputs (or simply echo PHP_VERSION).

$HTTP_POST_VARS is the old way of doing things. You can use $_POST['post-var']. To examine everything beint posted, use print_r($_POST).

like image 174
alex Avatar answered Sep 30 '22 15:09

alex