You are here

function biblio_ipni_get_author_data in Biblio Autocomplete 6

Same name and namespace in other branches
  1. 7 plugins/biblio_ipni/biblio_ipni.module \biblio_ipni_get_author_data()

Function to get author data from IPNI.

Parameters

$string: Text string to try and match

Return value

$ipni_matches An array of matched data from IPNI

1 call to biblio_ipni_get_author_data()
biblio_ipni_autocomplete_author_short in plugins/biblio_ipni/biblio_ipni.module
Gets a list of potential author matches for the autocomplete

File

plugins/biblio_ipni/biblio_ipni.module, line 157
Provides autocompletion of Biblio fields from IPNI.

Code

function biblio_ipni_get_author_data($string) {
  $ipni_result = file_get_contents('http://www.ipni.org/ipni/advAuthorSearch.do?find_abbreviation=' . str_replace(' ', '+', $string) . '&output_format=delimited');
  $ipni_matches = biblio_ipni_process_file($ipni_result);
  return $ipni_matches;
}