-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.php
60 lines (51 loc) · 1.47 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
header('Content-Type: text/plain; charset=utf-8');
# Bitte ggfs. anpassen
$activeConfig = 5;
switch($activeConfig){
// Lokale Entwicklung
case 1:
$url = 'http://ets.geyer.dev/app_dev.php/soap';
$apiKey = '58da1b33368e54.24164707';
$vid = 3;
break;
case 2:
// EKBO
$url = 'http://www.ekbo-termine.de/soap';
$apiKey = 'Ihr Api-Key'; # Siehe: http://www.ekbo-termine.de/Admin/apidoc
$vid = 0; # Die zum Api-Key passende Veranstalter-ID
break;
case 3:
// EKVW
$url = 'http://www.veranstaltungen-ekvw.de/soap';
$apiKey = 'Ihr Api-Key'; # Siehe: http://www.veranstaltungen-ekvw.de/Admin/apidoc
$vid = 0; # Die zum Api-Key passende Veranstalter-ID
break;
case 4:
// EKIR
$url = 'http://termine.ekir.de/soap';
$apiKey = 'Ihr Api-Key'; # Siehe: http://termine.ekir.de/Admin/apidoc
$vid = 0; # Die zum Api-Key passende Veranstalter-ID
break;
case 5:
$url = 'http://www.evangelische-termine.de/soap';
$apiKey = '58da1b33368e54.24164707';
$vid = 3;
break;
default:
break;
}
# Für Testzwecke:
$context = stream_context_create([
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
]
]);
$client = new SoapClient($url . "?WSDL" , array('cache_wsdl' => WSDL_CACHE_NONE,'stream_context' => $context));
$auth = new StdClass;
$auth->apiKey = $apiKey;
$auth->vid = $vid;
$header = new SoapHeader($url, "APIValidate", $auth);
$client->__setSoapHeaders($header);