使用cURL在PHP中轉(zhuǎn)發(fā)任何類型的$ _POST數(shù)據(jù)可以使用以下代碼:
// Initialize cURL
$ch = curl_init();
// Set the URL
curl_setopt($ch, CURLOPT_URL, 'http://www.example.com/');
// Set the request method to POST
curl_setopt($ch, CURLOPT_POST, true);
// Set the post data
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
// Execute the request
curl_exec($ch);
// Close the connection
curl_close($ch);