1 <?php
 2   // This script prints the DG responsible from PreLex.
 3   // The resulting text has been submitted to Many Eyes.
 4   $url = 'http://api.epdb.eu/prelex/dg_responsible/?key=YOUR_API_KEY';
 5   $data = json_decode(file_get_contents($url));
 6   foreach($data as $item) {
 7     echo $item->dg_responsible."\t";
 8     echo $item->number_of_documents."\n";
 9   }
10 ?>