Re: Alternative session control system
| From: | Ashley Sheridan | Date: | Mon, 26 Dec 2011 21:11:28 +0000 |
| Subject: | Re: Alternative session control system | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316103@lists.php.net to get a copy of this message | ||
Bastien <phpster@gmail.com> wrote:
>
>On 2011-12-26, at 7:04 AM, "Francisco M. Marzoa Alonso"
><francisco@marzoa.com> wrote:
>
>> Hello,
>>
>> I need an alternative session control system different from the PHP
>> standard one, that does not need to use the headers, because it's for
>a
>> series of scripts that will be accessed through AJAX javascript code
>> inserted in different places of a web page which headers I do not
>> control, so I cannot do an start_session before headers sent or
>> setcookies neither.
>>
>> I have an idea on how to solve this, based on client IP, but if there
>is
>> something done yet, I do not want to reinvent the wheel from scratch.
>>
>> Thanks a lot in advance,
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>The initial page load will contain some HTML and the js code needed for
>the app to work. This is the perfect place to launch the session and
>set the session cookie and the standard HTML headers. Ajax will only
>start after that initial page load and won't affect the first time the
>app is accessed
>
>Bastien Koert
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
Also, won't the session headers get passed automatically by javascript when it makes an ajax
call? I know embedded plugins (media players, flash, etc) won't, but the browser should for
everything it has control of.
Thanks,
Ash
http://ashleysheridan.co.uk