From 207c9f354ac44f65f3f47d36f00cc0c1d9013688 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Mon, 24 Nov 2014 13:56:01 +0000 Subject: [PATCH] Inclusão de variável para configuração de proxy --- classesphp/graficos.php | 6 ++++++ ferramentas/vinde/wmsindejson.php | 3 +++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/classesphp/graficos.php b/classesphp/graficos.php index 6201a0a..d604e8d 100644 --- a/classesphp/graficos.php +++ b/classesphp/graficos.php @@ -578,8 +578,14 @@ function dadosPerfilRelevo($pontos,$opcao,$amostragem,$item="",$map_file=""){ $pontos = str_replace(" ",",",$pontos); $urlGoogle .= $pontos."&samples=".$amostragem; $curl = curl_init(); + if(!isset($i3geo_proxy_server)){ + include(dirname(__FILE__)."/../ms_configura.php"); + } curl_setopt ($curl, CURLOPT_URL, $urlGoogle); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + if(isset($i3geo_proxy_server) && $i3geo_proxy_server != ""){ + curl_setopt($curl, CURLOPT_PROXY, $i3geo_proxy_server); + } $result = curl_exec($curl); curl_close ($curl); $result = json_decode( $result, true ); diff --git a/ferramentas/vinde/wmsindejson.php b/ferramentas/vinde/wmsindejson.php index 25ff4c4..4254641 100755 --- a/ferramentas/vinde/wmsindejson.php +++ b/ferramentas/vinde/wmsindejson.php @@ -29,6 +29,9 @@ if(!file_exists($arq)){ curl_setopt($ch, CURLOPT_URL, "http://www.visualizador.inde.gov.br/"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + if(isset($i3geo_proxy_server) && $i3geo_proxy_server != ""){ + curl_setopt($ch, CURLOPT_PROXY, $i3geo_proxy_server); + } $resultado = curl_exec($ch); curl_close($ch); -- libgit2 0.21.2