Subversion Repositories oidinfo_api

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 daniel-mar 1
<?php
2
 
3
require_once __DIR__ . '/oidinfo_api.inc.phps';
4
 
5
$oa = new OIDInfoAPI();
6
$oa->addSimplePingProvider('viathinksoft.de:49500');
7
 
8
echo $oa->xmlAddHeader('hello', 'world', 'test@example.com');
9
 
10
$params['allow_html'] = true; // Allow HTML in <description> and <information>
11
$params['allow_illegal_email'] = true; // It should be enabled, because the creator could have used some kind of human-readable anti-spam technique
12
$params['soft_correct_behavior'] = OIDInfoAPI::SOFT_CORRECT_BEHAVIOR_NONE;
13
$params['do_online_check'] = false; // Flag to disable this online check, because it generates a lot of traffic and runtime.
14
$params['do_illegality_check'] = false;
15
$params['do_simpleping_check'] = false;
16
$params['auto_extract_name'] = '';
17
$params['auto_extract_url'] = '';
18
$params['always_output_comment'] = false; // Do not output comment if there was an error (e.g. OID already existing)
19
$params['creation_allowed_check'] = false;
20
$params['tolerant_htmlentities'] = true;
21
$params['ignore_xhtml_light'] = false;
22
 
23
$elements['synonymous-identifier'] = ''; // string or array
24
$elements['description'] = '';
25
$elements['information'] = '';
26
 
27
$elements['first-registrant']['first-name'] = '';
28
$elements['first-registrant']['last-name'] = '';
29
$elements['first-registrant']['address'] = '';
30
$elements['first-registrant']['email'] = '';
31
$elements['first-registrant']['phone'] = '';
32
$elements['first-registrant']['fax'] = '';
33
$elements['first-registrant']['creation-date'] = '';
34
 
35
$elements['current-registrant']['first-name'] = '';
36
$elements['current-registrant']['last-name'] = '';
37
$elements['current-registrant']['address'] = '';
38
$elements['current-registrant']['email'] = '';
39
$elements['current-registrant']['phone'] = '';
40
$elements['current-registrant']['fax'] = '';
41
$elements['current-registrant']['modification-date'] = '';
42
 
43
$oid = '2.999';
44
echo $oa->createXMLEntry($oid, $elements, $params, $comment='hello');
45
 
46
$oid = '2.999.1';
47
echo $oa->createXMLEntry($oid, $elements, $params, $comment='hello');
48
 
49
echo $oa->xmlAddFooter();