My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
PubMed  

Using PubMed Document Delivery Service (DDS) with Celsus

Introduction

Using PubMed DDS with Celsus is straight forward. Loop through the GET variables and add them to the requests variable with two enters in between. This will pre-populate the request field with the PMID values.

Related Services: Outside Tool and Document Delivery Service

Details

Edit base "request.php" file and add the following code near the top.

// init variables
$all_requests = "";

// get pubmed IDs
foreach( $_GET as $key => $value )
{
  //echo "<br/>$key has a value of $value";
  if( substr( $key, 0, 5 ) === "PMID_" )
    $all_requests .= "PMID: $value\n\n\n";
}

Since Celsus requires login, you will also need to allow for passing GET variables to the login page and back.

Add redirection to the login page.

// check user id
if( $user_id <= 0 )
{
  $page_name = $_SERVER['PHP_SELF'];
  $query_string = $_SERVER['QUERY_STRING'];
  header("Location: login.php?page=$page_name&$query_string" );
}

And back to the request page.

Add to near top of "login.php" file.

// get page
$page = $_REQUEST['page'];

Edit the redirection portions of "login.php" file.

    if( $id > 0 )
    {
      // goto file
      header("Location: download.php?id=$id");
    }
    else if( $page != "" )
    {
      // goto page with query string
      $query_string = $_SERVER['QUERY_STRING'];
      header("Location: $page?$query_string");
    }
    else
    {
      // goto my account
      header("Location: myaccount.php?tab=$tab");
    }

Sign in to add a comment
Powered by Google Project Hosting