Ruttensoft
asked on
php Sample for a Webrequest
Hello
Can anyone post a very small sample which I can use to do a webrequest with POST on it, just sending the "post"-string back?
Thanks
Can anyone post a very small sample which I can use to do a webrequest with POST on it, just sending the "post"-string back?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<?php // RAY_bounce_post.php
error_reporting(E_ALL);
date_default_timezone_set('America/Chicago');
// START A BUFFER TO CAPTURE THE BROWSER OUTPUT
ob_start();
// SHOW WHAT WAS RECEIVED IN POST
var_dump($_POST);
// CAPTURE THE BUFFER
$posted_data = ob_get_clean();
// SAY THANK YOU
echo "THANK YOU " . date('r');
echo PHP_EOL;
echo $posted_data;
What I want is a php-file which is responding to a webrequest and returning something...You do not need CURL at all. That is why I posted the script at ID: 38418467. Didn't you test it?
ASKER
I think we misunderstood us. I am making the webrequest (with POST) out of another application to a php-server. What I want is a php-file which is responding to a webrequest and returning something...