function getExternalRequest($id) { for ($i = 0; $i < count($_SESSION["owsproxyUrls"]["url"]); $i++) { if ($id == $_SESSION["owsproxyUrls"]["id"][$i]) { $cUrl = $_SESSION["owsproxyUrls"]["url"][$i]; $query_string = removeOWSGetParams($_SERVER["QUERY_STRING"]); if ($query_string != '') { $cUrl .= getConjunctionCharacter($cUrl) . $query_string; } $metainfo = get_headers($cUrl, 1); // just for the stupid InternetExplorer header('Pragma: private'); header('Cache-control: private, must-revalidate'); header("Content-Type: " . $metainfo['Content-Type']); $content = getDocumentContent($cUrl, false); #$content = matchUrls($content); //In the case of http_auth - this is not possible cause we cannot save them in the header - maybe we could create a special session to do so later on? echo $content; } } }
function getExternalRequest($id) { for ($i = 0; $i < count($_SESSION["owsproxyUrls"]["url"]); $i++) { if ($id == $_SESSION["owsproxyUrls"]["id"][$i]) { $cUrl = $_SESSION["owsproxyUrls"]["url"][$i]; $query_string = removeOWSGetParams($_SERVER["QUERY_STRING"]); if ($query_string != '') { $cUrl .= getConjunctionCharacter($cUrl) . $query_string; } $metainfo = get_headers($cUrl, 1); // just for the stupid InternetExplorer header('Pragma: private'); header('Cache-control: private, must-revalidate'); header("Content-Type: " . $metainfo['Content-Type']); $content = getDocumentContent($cUrl); #$content = matchUrls($content); echo $content; } } }
$html .= '<div id="tabs-6">'; } if ($layout == 'plain') { $html .= '<h3>' . $translation["interfaces"] . '</h3>'; $html .= '<div>'; } $html .= '<p>'; /*$translation['mapbenderCapabilities'] = 'Geoportal Capabilities'; $translation['originalCapabilities'] = 'Original Capabilities'; $translation['kml'] = 'KML'; $translation['inspireMetadata'] = 'INSPIRE Service Metadaten'; $translation['securedCapabilities'] = 'Secured Capabilities URL';*/ $html .= $tableBegin; if ($resource == 'wms' or $resource == 'layer') { $html .= $t_a . $translation['mapbenderCapabilities'] . $t_b . "<a href = '../php/wms.php?layer_id=" . $layerId . "&PHPSESSID=" . session_id() . "&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS' target=_blank>" . $translation['capabilities'] . "</a>" . $t_c; $capUrl = $resourceMetadata['wms_getcapabilities'] . getConjunctionCharacter($resourceMetadata['wms_getcapabilities']) . 'REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS'; //show only original url if the resource is not secured! if (!$resourceSecured) { $html .= $t_a . $translation['originalCapabilities'] . $t_b . "<a href = '" . $capUrl . "' target=_blank>" . $translation['capabilities'] . "</a>" . $t_c; } $html .= $t_a . $translation['inspireCapabilities'] . $t_b . "<a href = '../php/wms.php?layer_id=" . $layerId . "&PHPSESSID=" . session_id() . "&INSPIRE=1&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS' target=_blank>" . $translation['capabilities'] . "</a>" . $t_c; $html .= $t_a . $translation['inspireMetadata'] . $t_b . "<a href='../php/mod_layerISOMetadata.php?SERVICE=WMS&outputFormat=iso19139&Id=" . $layerId . "' target=_blank >Link zu den Metadaten</a>" . $t_c; $html .= $t_a . $translation['inspireMetadataValidation'] . $t_b . "<a href='../php/mod_layerISOMetadata.php?SERVICE=WMS&outputFormat=iso19139&Id=" . $layerId . "&validate=true' target=_blank>" . $translation['showInspireMetadataValidation'] . "</a>" . $t_c; //if service is secured and http_auth is adjusted show secured url if ($resourceSecured) { $securedLink = HTTP_AUTH_PROXY . "/" . $layerId . "?REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS"; $html .= $t_a . $translation['securedCapabilities'] . $t_b . "<a href = '" . $securedLink . "' target=_blank>" . $translation['capabilities'] . "</a> " . $t_c; } //kml $html .= $t_a . $translation['kml'] . $t_b . "<a href='../php/mod_interfaceWms4Kml.php?id=" . $layerId . "'>KML herunterladen</a>" . $t_c; }