Curl returns true instead of value
You need to echo
not return
:
echo $_POST['auth_token'];
And you need CURLOPT_RETURNTRANSFER
to have curl_exec()
return the content:
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec
Returns TRUE on success or FALSE on failure. However, if the CURLOPT_RETURNTRANSFER option is set, it will return the result on success, FALSE on failure.