[OpenLayers-Users] Proxy.php
jrom
jerome.gasperi at gmail.com
Tue Sep 20 09:37:39 EDT 2011
Hi Gabriele,
Using PHP curl you should try something like this :
<?php
$url = $_REQUEST["url"];
$curl = initCurl($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'POST HTTP/1.0',
'Content-type: text/xml;charset="UTF-8"',
'Accept: text/xml',
'Cache-Control: no-cache',
'Pragma: no-cache'
));
curl_setopt($curl, CURLOPT_POSTFIELDS, $HTTP_RAW_POST_DATA);
curl_setopt($curl, CURLOPT_POST, TRUE);
$theData = curl_exec($curl);
curl_close($curl);
echo $theData;
?>
This is very untested code :) However modifying it to check if 'url'
is correctly set and to restrict access only to allowed host should be
easy
Regards
Jerome
--
http://jrom.info
On Tue, Sep 20, 2011 at 2:59 PM, Gabriele Seitz <ml-seitz at web.de> wrote:
> Hi everybody,
>
> I still haven't solved my problems with WFS and Proxy. There seems to be a
> problem with the proxy.php I used for testing. It seems to be written in
> PHP4 but I need it in PHP5 and it doesn't support POST.
>
> Is there anybody, who can provide me with a proxy.php to send my
> WFS-Requests to Geoserver (php5, acceppting POST, restricted to allowed
> hosts would be perfect)?
>
> Everything else seems to be okay.
>
> Thanks a lot.
>
> Gabriele
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Proxy-php-tp6812192p6812192.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
More information about the Users
mailing list