Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

6.11.2008

NCBI PubMed information retreival via PHP

A while back I had to use NCBI's entrez system to collect and process publication and genome records. While the system is designed to support Perl and Java api with ease, very little if any documentation is available for PHP api.

Below is the code that I've created to connect and collect data via Entez Utilities. Generally, this bit is designed based on user's query to retrieve a set of matching PIDs (Pubmed record IDs), and then utilizes Entrez Fetch to pull the actual records in xml format. The code is easily modified to suit any searching/retrieval needs. Utility and Parameter documentation can be found here: Entrez Utilities. While it is designed for Perl programmers, the parameter specifications are identical for PHP.

PHP5 code: