Select to view content in your preferred language

Problem with proxy page and bounding box

529
0
11-30-2012 08:30 AM
JohnGarvey
Deactivated User
I am making a rest call using a bounding box from my flex app. The call returns bad results when I run the url through my proxy.php but works correctly when i just enter the url into the browser. I am not sure how curl handles float numbers and whether I need a more complex proxy page (see basic proxy below).

I appreciate any thoughts.

[PHP]$ch = curl_init();

$timeout = 30;

$userAgent = $_SERVER['HTTP_USER_AGENT'];



curl_setopt($ch, CURLOPT_URL, $_REQUEST['url']);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);

curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);



$response = curl_exec($ch);    



if (curl_errno($ch)) {

    echo curl_error($ch);

} else {

    curl_close($ch);

    echo $response;

}[/PHP]
Tags (2)
0 Kudos
0 Replies