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:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
|
" codeBody "
php
$url= „“;
$UserId= " ";
$UserPassword= " ";
$VendorId= " ";
$VendorPassword= " ";
$cr= "";
$GetRoomTypesRequest = "";
$GetRoomTypesRequest = ' xml version= " 1.0 " encoding= " utf-8 "? > '. $cr;
$GetRoomTypesRequest =$GetRoomTypesRequest. „“. $cr;
$GetRoomTypesRequest =$GetRoomTypesRequest. „“. $cr;
$GetRoomTypesRequest =$GetRoomTypesRequest. „“. $UserId. „“. $cr;
$GetRoomTypesRequest =$GetRoomTypesRequest. „“. $UserPassword. „“. $cr;
$GetRoomTypesRequest =$GetRoomTypesRequest. „“. $VendorId. „“. $cr;
$GetRoomTypesRequest =$GetRoomTypesRequest. „“. $VendorPassword. „“. $cr;
$GetRoomTypesRequest =$GetRoomTypesRequest. „63“. $cr;
$GetRoomTypesRequest =$GetRoomTypesRequest. „“. $cr;
$GetRoomTypesRequest =$GetRoomTypesRequest. „“;
$data_string=trim ($GetRoomTypesRequest);
$filename= " GetRoomTypes ";
// $headerarr=array („tevreden-Type: tekst/xml“);
$headerarr = serie (
„Tevreden-type: tekst/xml; charset= \ „utf-8 \ "",
„Keur goed: tekst/xml“,
„Voorgeheugen-controle: geen-geheim voorgeheugen“,
„Pragma: geen-geheim voorgeheugen“,
„SOAPAction: \ „looppas \ "",
„Tevreden-lengte: “ .strlen ($data_string)
);
$file=fopen ($filename. „Request.xml“, „w+“);
fwrite ($file, $data_string);
fclose ($file);
$curl_handle = curl_init ();
curl_setopt ($curl_handle, CURLOPT_URL, $url);
curl_setopt ($curl_handle, CURLOPT_HTTPHEADER, $headerarr);
curl_setopt ($curl_handle, CURLOPT_HEADER, 0);
curl_setopt ($curl_handle, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($curl_handle, CURLOPT_POST, 1);
curl_setopt ($curl_handle, CURLOPT_POSTFIELDS, $data_string);
// voert de POST uit en krijgt de gegevens door de server zijn teruggekeerd die.
$result = curl_exec ($curl_handle) of matrijs („Er is een fout CURL_EXEC“ geweest);
// sluit het handvat van de KRUL
curl_close ($curl_handle);
$file=fopen ($filename. „Response.xml“, „w+“);
fwrite ($file, $result);
fclose ($file);
echo $result;
? >
php
$header [] = „tevreden-Type: tekst/xml“;
Het Doel URL van //
$sendTo = $url;
De PostGegevens van //
$post = data_string;
// leidt tot de Verbinding van de KRUL
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_USERAGENT, „xAgent XtraDoh“);
curl_setopt ($ch, CURLOPT_URL, $sendTo);
curl_setopt ($ch, CURLOPT_TIMEOUT, 900);
curl_setopt ($ch, CURLOPT_CONNECTIONTIMEOUT, 30);
curl_setopt ($ch, valse CURLOPT_FAILONERROR,);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($ch, ware CURLOPT_FOLLOWLOCATION,);
curl_setopt ($ch, ware CURLOPT_RETURNTRANSFER,);
curl_setopt ($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt ($ch, ware CURLOPT_POST,);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $post);
$result1 = curl_exec ($ch) of matrijs („Er is een fout CURL_EXEC“ geweest);
echo $result1;
? >
|