#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
This commit is contained in:
22
templates/map/client/proxy.php
Normal file
22
templates/map/client/proxy.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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 );
|
||||
Reference in New Issue
Block a user