mirror of
https://github.com/sebastianpauli/netgis-client.git
synced 2025-01-29 16:12:39 +01:00
25 lines
540 B
PHP
25 lines
540 B
PHP
<?php
|
|
|
|
// URL
|
|
$query = urldecode( $_SERVER[ "QUERY_STRING" ] );
|
|
|
|
// Open Session
|
|
$session = curl_init( $query );
|
|
|
|
// Only return contents, no headers
|
|
curl_setopt( $session, CURLOPT_HEADER, false );
|
|
curl_setopt( $session, CURLOPT_RETURNTRANSFER, true );
|
|
|
|
// Execute
|
|
$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;
|
|
|
|
// Done
|
|
curl_close( $session );
|