Skip to content

Instantly share code, notes, and snippets.

@hubgit
Created February 20, 2012 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hubgit/1869465 to your computer and use it in GitHub Desktop.
Save hubgit/1869465 to your computer and use it in GitHub Desktop.
Elsevier's Open 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 = curl_init('http://50.17.255.174/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