Publications

setOptions(array(“timeout” => 30));
$success = false;
do {
$resp = $req->send();
$code = $resp->getResponseCode();
if ($code != 301 && $code != 302) {
$success = true;
} else {
$cookie = $resp->getHeader(“Set-Cookie”);
if ($cookie) $req->addHeaders(array(“Cookie” => $cookie));
$req->setUrl($resp->getHeader(“Location”));
}
} while (!$success);
$body = $req->getResponseBody();

$body = preg_replace(“/

<\/div>/”, ”, $body);
$body = preg_replace(“/]*publication\_summary[^>]*>/”, ”, $body);
$body = preg_replace(“/<\/table>[^>]*<\/div>/”, ‘

‘, $body);
$body = preg_replace(“/]*>/”, ‘

  • ‘, $body);
    $body = preg_replace(“/<\/table>/”, ‘
  • ‘, $body);
    $body = preg_replace(“/

    /”, ”, $body);
    $body = preg_replace(“/<\/tbody>/”, ”, $body);
    $body = preg_replace(“/

    /”, ”, $body);
    $body = preg_replace(“/<\/tr>/”, ”, $body);
    $body = preg_replace(“/]*>/”, ”, $body);
    $body = preg_replace(“/<\/td>/”, ”, $body);
    $body = preg_replace(“/<\/div>[^>]*

  • /”, ‘
    • ‘, $body);
      $body = preg_replace(“/<\/li>[^>]*

      /”, ‘
    ‘, $body);

    $body = preg_replace(“//”, ‘‘, $body);

    echo $body;
    ?>