77,7 → 77,8 |
if (!self::strictCheckSyntax($oid)) return false; |
|
$pingResult = $this->pingOID($oid); |
return $pingResult[self::PING_IDX_EXISTS] >= 1; |
$ret = $pingResult[self::PING_IDX_EXISTS] >= 1; |
return $ret; |
} |
|
public function checkOnlineAvailable($oid) { |
84,7 → 85,8 |
if (!self::strictCheckSyntax($oid)) return false; |
|
$pingResult = $this->pingOID($oid); |
return $pingResult[self::PING_IDX_EXISTS] == 2; |
$ret = $pingResult[self::PING_IDX_EXISTS] == 2; |
return $ret; |
} |
|
public function checkOnlineAllowed($oid) { |
217,7 → 219,9 |
// HL7 registry has included this accidently |
$phone = str_replace('"', '', $phone); |
|
return trim($phone); |
$phone = trim($phone); |
|
return $phone; |
} |
|
private static function strip_to_xhtml_light($str, $allow_strong_text=false) { |
234,7 → 238,7 |
$str = preg_replace('@<\s*script.+<\s*/script.*>@isU', '', $str); |
$str = preg_replace('@<\s*style.+<\s*/style.*>@isU', '', $str); |
|
return preg_replace_callback( |
$str = preg_replace_callback( |
'@<(\s*/{0,1}\d*)([^\s/>]+)(\s*[^>]*)>@i', |
function ($treffer) { |
// see http://oid-info.com/xhtml-light.xsd |
249,6 → 253,8 |
return ''; |
} |
}, $str); |
|
return $str; |
} |
|
const OIDINFO_CORRECT_DESC_OPTIONAL_ENDING_DOT = 0; |
403,7 → 409,9 |
} |
|
// Required for XML importer of oid-info.com (E-Mail 09.12.2021) |
return str_replace('&', '&amp;', $desc); |
$desc = str_replace('&', '&amp;', $desc); |
|
return $desc; |
} |
|
public function xmlAddHeader($firstName, $lastName, $email) { |
605,7 → 613,6 |
throw new OIDInfoException("Unexpected soft-correction behavior for ASN.1 IDs"); |
} |
} |
unset($synid); |
} |
|
// ATTENTION: the XML-generator will always add <dotted-oid> , but what will happen if additionally an |
623,7 → 630,6 |
// Do not allow Numeric-only. It would only be valid in an IRI path, but not in a single identifier |
if (!iri_arc_valid($iri, false)) $iri = null; |
} |
unset($iri); |
} |
|
if (isset($elements['first-registrant']['phone'])) |
1023,7 → 1029,7 |
|
$ary = explode(':', $this->addr); // TODO: does not work with an IPv6 address |
$host = $ary[0]; |
$service_port = $ary[1] ?? self::DEFAULT_PORT; |
$service_port = isset($ary[1]) ? $ary[1] : self::DEFAULT_PORT; |
|
$is_ip = filter_var($host, FILTER_VALIDATE_IP) !== false; |
if (!$is_ip) { |
1057,7 → 1063,7 |
} |
|
protected function spp_reader_avail($oid, $failcount=0) { |
$in = "$oid\n\0"; // PHP's socket_send() does not send a trailing \n . There needs to be something after the \n ... :( |
$in = "${oid}\n\0"; // PHP's socket_send() does not send a trailing \n . There needs to be something after the \n ... :( |
|
if ($failcount >= self::SPP_MAX_CONNECTION_ATTEMPTS) { |
$msg = "Query $oid: CONNECTION TO SIMPLE PING PROVIDER FAILED!\n"; |
1103,11 → 1109,11 |
} |
|
public function disconnect() { |
$this->spp_reader_uninit(); |
return $this->spp_reader_uninit(); |
} |
|
public function connect() { |
$this->spp_reader_init(); |
return $this->spp_reader_init(); |
} |
|
function __construct($addr='localhost:49500') { |