replace $hashinput = "$output"."$data"; with $hashinput = "$data"."$output"; and replace curl_setopt($ch, CURLOPT_POST, $output); with curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $output); (from Coinbase Community forum)...
You are missing a true parameter for raw_output when doing a hash_hmac http://php.net/manual/en/function.hash-hmac.php raw_output: When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits....