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.
74 lines
2.2 KiB
74 lines
2.2 KiB
<?php |
|
|
|
include "SGP.php"; |
|
|
|
$sgp = new SGP('90384833-6f95-4970-8bfc-01d8472ad559', 'suporte.topnetbrasil.com'); |
|
|
|
$doc = $sgp->identificarDocumento('03087470112'); |
|
////$doc = $sgp->identificarDocumento('0308747011'); |
|
print_r($doc); |
|
|
|
//$access = $sgp->verificaAcesso('703'); |
|
//print_r($access); |
|
|
|
/*$params = array( |
|
"token" => '90384833-6f95-4970-8bfc-01d8472ad559', |
|
"app" => 'ura', |
|
"cpfcnpj" => '03087470112' |
|
);*/ |
|
|
|
//$fp = fopen(dirname(__FILE__).'/curlTopnet.txt', 'w'); |
|
//$ch = curl_init(); |
|
//curl_setopt($ch, CURLOPT_URL, "http://suporte.topnetbrasil.com/ws/ura/consultacliente/"); |
|
//curl_setopt($ch, CURLOPT_POSTFIELDS, $params); |
|
//curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); |
|
//curl_setopt($ch, CURLOPT_TIMEOUT, 10); |
|
//curl_setopt($ch, CURLOPT_VERBOSE, 1); |
|
//curl_setopt($ch, CURLOPT_STDERR, $fp); |
|
|
|
//$response = curl_exec($ch); |
|
//$result = json_decode($response,true); |
|
|
|
//print_r($result); |
|
|
|
|
|
//$cpf = '03087470112'; |
|
//$url = 'http://suporte.topnetbrasil.com:8000/ws/ura/consultacliente/'; |
|
//$data = array('token' => '90384833-6f95-4970-8bfc-01d8472ad559', 'app' => 'ura', 'cpfcnpj' => $cpf); |
|
// |
|
//$options = array( |
|
// 'http' => array( |
|
// 'header' => "Content-type: application/x-www-form-urlencoded\r\n", |
|
// 'method' => 'POST', |
|
// 'content' => http_build_query($data) |
|
// ) |
|
//); |
|
//$context = stream_context_create($options); |
|
//$result = file_get_contents($url, false, $context); |
|
//$retorno = json_decode($result, true); |
|
// |
|
//print_r($retorno); |
|
|
|
|
|
|
|
//$contrato = '703'; |
|
//$url = 'http://suporte.topnetbrasil.com/ws/ura/verificaacesso/'; |
|
//$data = array('token' => '90384833-6f95-4970-8bfc-01d8472ad559', 'app' => 'ura', 'contrato' => $contrato); |
|
// |
|
//$options = array( |
|
// 'http' => array( |
|
// 'header' => "Content-type: application/x-www-form-urlencoded\r\n", |
|
// 'method' => 'POST', |
|
// 'content' => http_build_query($data) |
|
// ) |
|
//); |
|
//$context = stream_context_create($options); |
|
//$result = file_get_contents($url, false, $context); |
|
//$retorno = json_decode($result, true); |
|
// |
|
//foreach ($retorno as $key => $value) { |
|
// $resultado[$key] = utf8_decode($value); |
|
//} |
|
// |
|
//print_r($resultado);
|
|
|