[Cartoweb-users] retrieve cartoweb session
Simon ORTET
simon.ortet at silogic.fr
Wed Jan 30 11:34:11 EST 2008
Hello
I have a problem with sessions and cookies:
The user load my application, it makes a call to cartoweb via CURL:
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL,
$this->servApp.$this->aliasCartoweb."/client.php");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"ajaxActionRequest=Location.Zoom");
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
With the values from the XML returned i update the GUI of my application
(map, overview, scale, layers...)
Then the user make some actions (zoom in, adds some layers...etc). All
the actions are AJAX requests to cartoweb. The page is never reloaded.
Actually the problem comes when i reload the page. An new curl session
is send and my cartoweb session is lost. So all the actions made by the
user are lost.
So my problem is: how can i retrieve the cartoweb session lost so the
user gets back his context after reloading the page?
I tried several things:
- send the PHPSESSID to cartoweb in the Curl call
- send the user cookie via curl
Nothing works until then. I'm stuck
Any help would be very appreciated
More information about the Cartoweb-users
mailing list