Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egonw/1869624 to your computer and use it in GitHub Desktop.
Save egonw/1869624 to your computer and use it in GitHub Desktop.
Elsevier's Text Miner Service
<?php
$params = array(
'client' => 'lipids', // or 'locus', for Arabidopis
'app' => 'lipids', // or 'locus', for Arabidopis
'mimetype' => 'text/html',
'contents' => file_get_contents('article.html'),// read the article HTML from a separate file
);
$curl = curl_init('http://tryit.elsevier.com/oms/OpenMinerService');
curl_setopt_array($curl, array(
//CURLOPT_VERBOSE => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($params),
CURLOPT_USERPWD => 'OMS:Op3nM1n3rS3rv1c3',
));
$response = curl_exec($curl);
print_r($response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment