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);