ListRecords->resumptionToken; # get the resumption token $oaierror = $xml->error; $oairesponsedate=$xml->responseDate; $listrecfile = $restoken.".xml"; #echo "\nDEBUG[[".$restoken."]][[".$oaierror."]][[".$listrecfile."]]\n";; if($requestdelay > 0){echo "waiting($requestdelay)";} sleep($requestdelay); # wait x seconds if configured to do so $fh=null;$results=null; $xml=null; #cleanup echo "\n"; } /* end of while */ /* we might get here out of while loop due to error so check and report any */ if(strcmp("",$oaierror)) { echo "\n** ERROR STOP\n"; echo "\nOAI error: ".$oaierror; echo "\nOAI ResponseDate: ".$oairesponsedate; echo "\nURL was: ".$url; } myexit(); /********************/ function myexit() { global $olddstvalue; # any global cleanup do it here #set default_socket_timeout back to what it was #echo "resetting default_socket_timeout to $olddstvalue\n"; if($olddstvalue != FALSE) { $retvalue = ini_set("default_socket_timeout",$olddstvalue); if($retvalue == FALSE){echo "WARNING: failed to reset default_socket_timeout ($olddstvalue)\n";} } exit; } ?>