I was trying to do the following
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"php://input" );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
$result=curl_exec ($ch);
echo curl_error($ch);
echo $result;
to get raw post data using curl because my hosting com disabled all socket functions except curl so i cannot do file_get_contents(“php://input”);
i get an error like
Protocol php not supported or disabled in libcurl1
what shall i do?
You can use
$HTTP_RAW_POST_DATAinstead of “php://input”. For details see the php://input section at http://php.net/manual/wrappers.php.phpOther solution: what are the alternatives for php://input and $HTTP_RAW_POST_DATA when file_get_contents and always_populate_raw_post_data are disabled