Welcome Guest, Not a member yet? Register   Sign In
Dealing with Post-Back from other applications
#1

[eluser]Zack Kitzmiller[/eluser]
I'm working on a project right now where I'm working with a thrid-party, and every night they POST some data to a URL.

In the third-party application if I set my Post-Back URL to postbin.com/1b9pvqm, it works fine. and I can get to the data they post me.

But I can't seem to capture the data in a controller. I've tried the following.

Code:
log_message('info', 'received postback');
log_message('info', print_r($_POST);
log_message('info', print_r($_POST, TRUE);
log_message('info', print_r($_POST[]));
log_message('info', print_r($_POST[], TRUE));
log_message('info', print_r($_POST['body']));
log_message('info', print_r($_POST['body'], TRUE));
log_message('info', echo($_POST['body']));
foreach ($_POST as $k => $v) {
    log_message('info', 'key: ' . $k);
    log_message('info', 'value: ' . $v);
}
log_message('info', 'end postback');

And I only get the 'received postback' & 'end postback' messages. Ideas?
#2

[eluser]danmontgomery[/eluser]
print_r doesn't return a value unless you pass a second paramater.

http://php.net/manual/en/function.print-r.php

Code:
log_message('info', print_r($_POST, TRUE));
#3

[eluser]Zack Kitzmiller[/eluser]
I only tried each line one at a time. I should have been more clear in my original post.

Either way. I tried that, but thanks anyway.




Theme © iAndrew 2016 - Forum software by © MyBB