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
RuttensoftAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Loganathan NatarajanConnect With a Mentor LAMP DeveloperCommented:
0
 
RuttensoftAuthor Commented:
Hi

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...
0
 
Ess KayEntrapenuerCommented:
0
 
Ray PaseurCommented:
<?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;

Open in new window

0
 
Ray PaseurCommented:
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?
0
All Courses

From novice to tech pro — start learning today.