-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
We could do it based on DOIs using something like this:
<?php
$doi = $argv[1];
$url = 'http://dx.doi.org/'.$doi;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$a = curl_exec($ch);
if(preg_match('#Location: (.*)#', $a, $r))
$l = trim($r[1]);
return $l;For things that don't have a DOI (only arXiv?) we can make the URL from the ID:
$arxivID = $argv[1];
$url 'https://arxiv.org/abs/'.$arxivID
return $urlReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels