Commit b3d721c455303c57430ad47c1fb96afec777ec4c

Authored by Edmar Moretti
1 parent 96a09fef

Correção na opção de visualização de serviços wms

admin/admin.db
No preview for this file type
classesphp/wmswfs.php
... ... @@ -53,7 +53,7 @@ Return:
53 53 */
54 54 function gravaCacheWMS($servico)
55 55 {
56   - global $dir_tmp;
  56 + global $dir_tmp, $i3geo_proxy_server;
57 57 if($dir_tmp == ""){
58 58 include(dirname(__FILE__)."/../ms_configura.php");
59 59 }
... ... @@ -75,14 +75,25 @@ function gravaCacheWMS($servico)
75 75 $wms_service_request .= "&VERSION=1.1.1";
76 76 }
77 77 $nome = $dir_tmp."/wms".md5($servico).".xml";
  78 + //echo ($wms_service_request);exit;
78 79 if(!file_exists($nome)){
79   - $wms_capabilities = file($wms_service_request);
80   - if( !$wms_capabilities ){
  80 + //$wms_capabilities = file($wms_service_request);
  81 + $curl = curl_init();
  82 + curl_setopt ($curl, CURLOPT_URL, $wms_service_request);
  83 + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  84 + curl_setopt($curl, CURLOPT_HEADER, 0);
  85 + if(isset($i3geo_proxy_server) && $i3geo_proxy_server != ""){
  86 + curl_setopt($curl, CURLOPT_PROXY, $i3geo_proxy_server);
  87 + }
  88 + $wms_capabilities = curl_exec($curl);
  89 + curl_close ($curl);
  90 + if( !$wms_capabilities || $wms_capabilities == ""){
81 91 return "erro";
82 92 }
83 93 else{
84 94 $fp = fopen($nome, 'w');
85   - fwrite($fp, implode("",$wms_capabilities));
  95 + //fwrite($fp, implode("",$wms_capabilities));
  96 + fwrite($fp,$wms_capabilities);
86 97 fclose($fp);
87 98 }
88 99 }
... ...
css/i3geo7.css.php 100755 → 100644
js/i3geo_tudo_compacto7.js.php 100755 → 100644