Get Taxonomy
Enter all or part of a scientific name in the box below to return a list of matching species.Click here to view the source code.
Click here to view the request to the server.
Click here to view the returned XML file.
if(!isset($_POST["spp"])){ echo "Please enter a species name in the box above"; }else{ $proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : ''; $proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : ''; $proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : ''; $proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : ''; $client = new soapclient("http://212.219.37.104/NBNWebServices/ws/WSDL", 'true', $proxyhost, $proxyport, $proxyusername, $proxypassword); // Set timeouts, nusoap default is 30 $client->timeout = 500; $client->response_timeout = 500; $err = $client->getError(); if ($err) { echo 'Constructor error
' . $err . ''; } $query1='
Results
'; //print $result; //the xml returned from the gateway appears to be missing the xml header which upsets PHP - so fix it first $fle=$client->response; $fle=str_replace("nbntq:","",$fle); //$obj = simplexml_load_string(fixupxml($client->response)); $obj = simplexml_load_string(fixupxml($fle)); print (""); echo "
| Category | Scientific name | Taxon Version Key | Authority |
|---|---|---|---|
| ". ucfirst($Taxon->TaxonReportingCategory) ." | ". $Taxon->TaxonName. " | ". $Taxon['taxonVersionKey'] ." | ". $Taxon->Authority. " |
"); print '
Request to Server
'; echo 'Back to the top
"; //Debugging code if(isset($_GET["debug"])){ print '
Fixed up XML
'; echo 'Response
'; echo 'Debug
' . $debug . '
'; } echo "
The Returned XML File
"; print htmlspecialchars(fixupxml($client->response)); echo ""; } ?>
Back to the top