編集 - これは機能しません
これを試して:
// Set Data
$data = array();
$data['address'] = $_POST['address'];
$data['name'] = $_POST['name'];
// the other info ....
// Send post data as url-encoded in the header
$req = http_build_query($data);
header("method: POST\r\n");
header("Host: localhost\r\n");
header("Content-Type: application/x-www-form-urlencoded\r\n");
header("Content-Length: ".strlen($req)."\r\n");
header($req."\r\n\r\n");
header("Connection: close\r\n\r\n");
header("Location: http://paypal.com/path/\r\n");
初期投稿
カールを使用できます:
$ch = curl_init('http://paypal.com/path/');
// Set Data
$data = array();
$data['address'] = $_POST['address'];
$data['name'] = $_POST['name'];
// the other info ....
// Set options
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Execute
$page = curl_exec($ch);