konova/templates/map/client/proxy.php
mpeltriaux eb3d58ed19 #138 Map client to views
* adds netgis map client to all detail and report views
* adds netgis map client to new object forms
* WIP: needs functionality server-client
2022-04-04 12:27:45 +02:00

23 lines
606 B
PHP

<?php
//$query = urldecode( $_GET[ "q" ] );
$query = urldecode( $_SERVER[ "QUERY_STRING" ] );
// Open the Curl session
$session = curl_init( $query );
// Don't return HTTP headers. Do return the contents of the call
curl_setopt( $session, CURLOPT_HEADER, false );
curl_setopt( $session, CURLOPT_RETURNTRANSFER, true );
// Make the call
$response = curl_exec( $session );
// Output
header( "Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept" );
header( "Access-Control-Allow-Origin: *" );
header( "Content-Type: application/json" );
echo $response;
curl_close( $session );