Commit 207c9f354ac44f65f3f47d36f00cc0c1d9013688
1 parent
37b1a106
Exists in
master
and in
7 other branches
Inclusão de variável para configuração de proxy
Showing
2 changed files
with
9 additions
and
0 deletions
Show diff stats
classesphp/graficos.php
| @@ -578,8 +578,14 @@ function dadosPerfilRelevo($pontos,$opcao,$amostragem,$item="",$map_file=""){ | @@ -578,8 +578,14 @@ function dadosPerfilRelevo($pontos,$opcao,$amostragem,$item="",$map_file=""){ | ||
| 578 | $pontos = str_replace(" ",",",$pontos); | 578 | $pontos = str_replace(" ",",",$pontos); |
| 579 | $urlGoogle .= $pontos."&samples=".$amostragem; | 579 | $urlGoogle .= $pontos."&samples=".$amostragem; |
| 580 | $curl = curl_init(); | 580 | $curl = curl_init(); |
| 581 | + if(!isset($i3geo_proxy_server)){ | ||
| 582 | + include(dirname(__FILE__)."/../ms_configura.php"); | ||
| 583 | + } | ||
| 581 | curl_setopt ($curl, CURLOPT_URL, $urlGoogle); | 584 | curl_setopt ($curl, CURLOPT_URL, $urlGoogle); |
| 582 | curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); | 585 | curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); |
| 586 | + if(isset($i3geo_proxy_server) && $i3geo_proxy_server != ""){ | ||
| 587 | + curl_setopt($curl, CURLOPT_PROXY, $i3geo_proxy_server); | ||
| 588 | + } | ||
| 583 | $result = curl_exec($curl); | 589 | $result = curl_exec($curl); |
| 584 | curl_close ($curl); | 590 | curl_close ($curl); |
| 585 | $result = json_decode( $result, true ); | 591 | $result = json_decode( $result, true ); |
ferramentas/vinde/wmsindejson.php
| @@ -29,6 +29,9 @@ if(!file_exists($arq)){ | @@ -29,6 +29,9 @@ if(!file_exists($arq)){ | ||
| 29 | curl_setopt($ch, CURLOPT_URL, "http://www.visualizador.inde.gov.br/"); | 29 | curl_setopt($ch, CURLOPT_URL, "http://www.visualizador.inde.gov.br/"); |
| 30 | curl_setopt($ch, CURLOPT_HEADER, 0); | 30 | curl_setopt($ch, CURLOPT_HEADER, 0); |
| 31 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | 31 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
| 32 | + if(isset($i3geo_proxy_server) && $i3geo_proxy_server != ""){ | ||
| 33 | + curl_setopt($ch, CURLOPT_PROXY, $i3geo_proxy_server); | ||
| 34 | + } | ||
| 32 | $resultado = curl_exec($ch); | 35 | $resultado = curl_exec($ch); |
| 33 | curl_close($ch); | 36 | curl_close($ch); |
| 34 | 37 |