php发送http post请求,用的是curl方法,我该如何接收这个post请求的数据呢

php发送http post请求,用的是curl方法,我该如何接收这个post请求的数据呢

问题描述:

curl方法如下:
function request_by_curl($remote_server, $post_string) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $remote_server);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'mypost=' . $post_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, "snsgou.com's CURL Example beta");
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
我将一个数据从网站a发送到网站b,a和b是两个完全不同的网站,我该如何在
网站b中接收那个数据,能具体一点说明一下吗,最好有个范例

    通过这样能得到吗
$ch = curl_init();
$data = curl_exec($ch);
curl_close($ch);
return $data;