1. Go to this page and download the library: Download renanbr/crossref-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
renanbr / crossref-client example snippets
class RenanBr\CrossRefClient
{
// Returns JSON decoded as array
public function request($path, array $parameters = []);
// Returns boolean
public function exists($path);
public function setUserAgent($userAgent);
public function setCache(Psr\SimpleCache\CacheInterface $cache);
public function setVersion($version);
}
$client = new RenanBr\CrossRefClient();
$work = $client->request('works/10.1037/0003-066X.59.1.29');
print_r($work);
$client = new RenanBr\CrossRefClient();
$exists = $client->exists('members/98');
var_dump($exists);