I have been trying to run this PHP script. There is no output whatsoever and I cannot seem to understand the reason.
<?php
echo "Example DOI Query <be>";
$doi = someDOIvalue;
echo 'DOI: '.$doi.'<br>';
$query = 'curl -LH "Accept: application/json" http://doi.org/';
$cmd = $query.$doi." | jq '.title'";
echo $cmd;
$title = shell_exec($cmd);
echo 'Title:<br>'.$title;
?>
However, when I try to use the same command on my LINUX command line (as below), it works perfectly fine.
curl -LH "Accept: application/json" http://doi.org/10.1016/someDOIvalue | jq '.title'
Any idea what I'm doing wrong?