$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, “http://yourdomain.com.tw” );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt($ch, CURLOPT_POST, 1 );
curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘Content-Type: text/plain’));
curl_setopt($ch, CURLOPT_POSTFIELDS, “POST RAW 資料” );
$result=curl_exec ($ch);
引用資料
RAW POST using cURL in PHP
http://stackoverflow.com/questions/871431/raw-post-using-curl-in-php