-
Notifications
You must be signed in to change notification settings - Fork 1
/
curl().billbee.io
79 lines (35 loc) · 1.33 KB
/
curl().billbee.io
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
<?php
// include('config.php');
// $mysqli = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
// // $mysqli = mysqli_connect('localhost', 'etranzde_garteopencart', 'Berlin_2022!!', 'etranzde_gartendek_opencart');
// $mysqli -> set_charset("utf8");
// $lang_id_ru = '2';
// $lang_id_ro = '3';
// $orders="SELECT * FROM `oc_order` LIMIT 1";
// $result=mysqli_query($mysqli,$orders);
// $result_array=[];
// while($result_row=mysqli_fetch_assoc($result)){
// $result_array[]=$result_row;
// }
// echo "<pre>";
// print_r($result_array);
// echo "</pre>";
$ch=curl_init();
$headers = array(
'Content-Type:application/json',
'Authorization: Basic '. base64_encode("Alex_fiverr:6dfab82de40a715dc20930481e"),
'X-Billbee-Api-Key: 4A6868BB-13D2-4D70-918E-B499412C0528'
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_HEADER, 0);
// curl_setopt($ch, CURLOPT_USERPWD, "Alex_fiverr:6dfab82de40a715dc20930481e" );
curl_setopt($ch, CURLOPT_URL, 'https://api.billbee.io/api/v1/orders');
// curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
$output=json_decode($server_output,1);
echo "<pre>";
print_r($output['Data'][0]);
echo "</pre>";
curl_close($ch);
?>