* <a href="http://example.com/Bibsonomy.php?id=123">Bibsonomy</a> */ /* * * DO NOT MESS BEHIND THIS LINE * */ // include some objects and methods require_once 'unAPI.inc.php'; // make some GET-variables a little bit handier $id = $_GET['id']; // check if $id is not empty if (!isset($id) || $id == '') { header('HTTP/1.0 406 Not Acceptable'); echo "406: Not Acceptable"; return; } // instantiate new Picappn() $pica = new Picappn(); // set PPN as identifier $pica->setPpn($id); // get URL for redirecting to Bibsonomy $res = $pica->getBibsonomy(); // check if $res is not empty and do redirect if (!isset($res) || $res == '') { header('HTTP/1.0 406 Not Acceptable'); echo "406: Not Acceptable"; return; } else { header("Location: {$res}"); }