google-code-export / geoxml

Automatically exported from code.google.com/p/geoxml
1 stars 1 forks source link

proxy requieres #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Need the php proxu to work correctly and curl enable

this is the proxy php source:

<?php
$post_data = $HTTP_RAW_POST_DATA;
$header[] = "Content-type: text/xml";
$header[] = "Content-length: ".strlen($post_data);
$ch = curl_init( urldecode($_GET['url']) );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 80);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_FAILONERROR, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

if ( strlen($post_data)>0 ){
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
}

$response = curl_exec($ch);
if (curl_errno($ch)) {
    print curl_error($ch);
} else {

    curl_close($ch);
    print $response;
}

?>

Original issue reported on code.google.com by pardoc...@gmail.com on 6 Mar 2009 at 1:59

GoogleCodeExporter commented 9 years ago

Original comment by lanceala...@gmail.com on 6 Mar 2009 at 4:36

GoogleCodeExporter commented 9 years ago
I have made a page on the wiki and posted this.

Original comment by lanceala...@gmail.com on 6 Mar 2009 at 4:47

GoogleCodeExporter commented 9 years ago

Original comment by lanceala...@gmail.com on 6 Mar 2009 at 4:51