WoRMS banner
Add search provider Add provider
Twitter: Latest updates @WRMarineSpecies

Life Science Identifier (LSID)

LSIDs are persistent, location-independent, resource identifiers for uniquely naming biologically significant resources.
The LSID concept introduces a straightforward approach to naming and identifying data resources stored in multiple, distributed data stores in a manner that overcomes the limitations of naming schemes in use today [more information].

WoRMS has implemented LSIDs for all its taxonomic names and they are displayed on each taxon page. We have integrated the AphiaID into the LSID, so in fact you can continue using the AphiaID.

For example: the LSID for Solea solea is: urn:lsid:marinespecies.org:taxname:127160
You can resolve an LSID via the various services available.
Example for Solea solea: http://lsid.tdwg.org

The returned model is RDF (XML) with metadata elements from Darwin Core and Dublin Core.

Vocabularies using a WoRMS unique identifier



[Back]

Calling the WoRMS webservice from PHP5

This tutorial assumes you are using any webserver with PHP5 installed and working properly.

Step 1: Enable the soap extension in your php.ini

If you downloaded pre-compiled platform binaries, they may have ext/soap compiled in but not loaded, so you'll need to update your PHP configuration to load ext/soap. Edit your php.ini, and look for the Dynamic Extensions section. Add a line (or removed the ';' in front), this will cause the extension to be loaded automatically.

SOAP Extension

  • On Windows: extension=php_soap.dll
  • On UNIX: extension=php_soap.so

If you haven't previously loaded any optional extensions, you may also have to set the extension_dir directive to point to the directory containing the extension libraries, including php_soap, for example: extension_dir="C:/php/ext/" (use forward slashes even on Windows)
Don't try to put directory information in the extension directive; use extension_dir if necessary.


Step 2: Paste the following code in a .php file (this is just an example)
 $client = new SoapClient("http://www.marinespecies.org/aphia.php?p=soap&wsdl=1");

 $AphiaID=$client->getAphiaID("Solea solea");
 $taxon=$client->getAphiaRecordByID($AphiaID);
 echo "<b>AphiaID</b>: ".$taxon->AphiaID."<br />\n";
 echo "<b>Displayname</b>: ".$taxon->scientificname." ".$taxon->authority."<br />\n";
 echo "<b>URL</b>: ".$taxon->url."<br />\n";
 echo "<b>Accepted name</b>: ".$taxon->valid_name." ".$taxon->valid_authority."<br />\n";
 $class=$client->getAphiaClassificationByID($AphiaID);
 echo "<b>Classification</b>: ";
 show_classification($class);

 function show_classification($class){
  echo $class->scientificname." (".$class->rank.") > ";
  if ($class->child) show_classification($class->child);
 }

Step 3: Run the script

It should return something like this:
AphiaID: 127160
Displayname: Solea solea (Linnaeus, 1758)
URL: http://www.marinespecies.org/aphia.php?p=taxdetails&id=127160
Accepted name: Solea solea (Linnaeus, 1758)
Classification: Animalia (Kingdom) > Chordata (Phylum) > Vertebrata (Subphylum) > Gnathostomata (Superclass) > Pisces (Superclass) > Actinopterygii (Class) > Pleuronectiformes (Order) > Soleidae (Family) > Solea (Genus) > Solea solea (Species) >

Download this example.