forked from Claudio/integracao
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.1 KiB
56 lines
1.1 KiB
2 years ago
|
<?php
|
||
|
ini_set('display_errors', 1);
|
||
|
error_reporting(E_ALL);
|
||
|
$url = 'https://integrator.wlenet.com.br/integrator.server.php';
|
||
|
|
||
|
$params =array(
|
||
|
"request" => array(
|
||
|
"sendRequest" => "integrator.server",
|
||
|
"method" => "execute",
|
||
|
"submethod"=> "view.execute",
|
||
|
"params"=>array(
|
||
|
"_consulta" => "02A50HOX3E",
|
||
|
"_user" => "25A50GL3HQ",
|
||
|
"_passwd" => "25A50GL40Z",
|
||
|
"codcli" => "42086"
|
||
|
)
|
||
|
)
|
||
|
);
|
||
|
|
||
|
|
||
|
$curl = curl_init();
|
||
|
|
||
|
curl_setopt($curl,CURLOPT_URL, $url );
|
||
|
|
||
|
curl_setopt($curl,CURLOPT_RETURNTRANSFER, 1);
|
||
|
|
||
|
curl_setopt($curl,CURLOPT_POST, 1);
|
||
|
|
||
|
curl_setopt($curl,CURLOPT_SSL_VERIFYPEER, false);
|
||
|
|
||
|
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||
|
|
||
|
curl_setopt($curl,CURLOPT_POSTFIELDS,json_encode($params, true));
|
||
|
|
||
|
curl_setopt($curl,CURLOPT_HTTPHEADER, array('Cache-Control: no-cache', 'Content-Type: application/json', 'ApplicationV: Integrator/6'));
|
||
|
|
||
|
|
||
|
$response = curl_exec($curl);
|
||
|
//curl_close($curl);
|
||
|
|
||
|
$resp = json_decode($response,true);
|
||
|
|
||
|
//echo $resp['data']['results'][0]['codcon'];
|
||
|
|
||
|
print_r($resp);
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|