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
|
<?php
if(!function_exists('call_API')){ function call_API($url, $postData, $post) { if(!empty($post)){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); $result = curl_exec($ch); curl_close($ch); }else{ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); curl_setopt($ch, CURLOPT_HEADER, 0); $result = curl_exec($ch); curl_close($ch); }
return $result; } }
$_REQUEST["v_mid"]; $v_subid = $_REQUEST["v_subid"]; $v_auditstatus = $_REQUEST["v_auditstatus"]; $v_auditstatusdesc = $_REQUEST["v_auditstatusdesc"]; $v_mac = $_REQUEST["v_mac"];
$url = 'http://api.silkroadebelt.com/api/merchant_application'; $postData = array( 'v_mid' => 10903, 'v_subid' => 1, 'v_auditstatus' => 1, 'v_auditstatusdesc' => 222, 'v_mac' => 1, ); $post = 1; $result = call_API($url, $postData, $post);
var_dump($result);
echo 1; exit; include 'webadmin/config.php';
$merchant_code = 10903; $supplier_code = 1;
$sql = 'select * from supplier2 where merchant_code = ? and supplier_code = ? and deleted = ?'; $parameters = array($merchant_code, $supplier_code, 0); $result = bind_pdo($sql, $parameters, "selectone", true, $dbh_list['application']); var_dump($result);
|