(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:
|
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 ("Zadawalać-Typ: tekst/xml ");
$headerarr = szyk (
"Zadawalać-Typ: tekst/xml; charset= \ "utf-8 \ "",
"Akceptować: tekst/xml",
"Cache-Kontrolować: żadny-cache",
"Pragma: żadny-cache",
"SOAPAction: \ "\ "",
"Zadawalać-Długość: " .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);
// Wykonywać the POCZTA i dostawać the dane the serwer.
$result = curl_exec ($curl_handle) lub kostka do gry ("Tam być CURL_EXEC błąd");
// Zakończenie the SKARBIKOWANY rękojeść
curl_close ($curl_handle);
$file=fopen ($filename. "Response.xml", "w+");
fwrite ($file, $result);
fclose ($file);
echowy $result;
? >
php
$header [] = "Zadawalać-Typ: tekst/xml";
// Cel URL
$sendTo = $url;
// Poczta Dane
$post = data_string;
// Tworzyć SKARBIKOWANY Związek
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_USERAGENT, "XtraDoh xAgent ");
curl_setopt ($ch, CURLOPT_URL, $sendTo);
curl_setopt ($ch, CURLOPT_TIMEOUT, 900);
curl_setopt ($ch, CURLOPT_CONNECTIONTIMEOUT, 30);
curl_setopt ($ch, CURLOPT_FAILONERROR, fałszywy);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, (0));
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, (0));
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $post);
$result1 = curl_exec ($ch) lub kostka do gry ("Tam być CURL_EXEC błąd");
echowy $result1;
? >
|