Page 1 of 1
Session sharing for download managers? [solved]
Posted: Mon Jun 29, 2009 12:10 pm
by Eric!
Lets say I'm logged in wiith a session to devnetwork.net and I start a new browser instance. When the new instance goes to devnetwork.net it shares the already open session with the first browser instance. Is something special done to allow this?
Is there a way or a mechanism to do this with download managers? So a logged in user can launch a manager and share the authorized session for a download?
Right now the download manager is denied because its session data is empty. I've been doing an ip address comparison to authorize download managers of logged in users, but I don't like this method.
Any ideas on how to do this differently?
Re: Session sharing for download managers?
Posted: Mon Jun 29, 2009 1:12 pm
by VladSun
Eric! wrote:Lets say I'm logged in wiith a session to devnetwork.net and I start a new browser instance. When the new instance goes to devnetwork.net it shares the already open session with the first browser instance.
Is something special done to allow this?
Yes, they are sharing the same cookie, with the same session ID stored in it.
Eric! wrote:Is there a way or a mechanism to do this with download managers? So a logged in user can launch a manager and share the authorized session for a download?
Right now the download manager is denied because its session data is empty. I've been doing an ip address comparison to authorize download managers of logged in users, but I don't like this method.
Any ideas on how to do this differently?
I'm not sure what you mean by download managers in this case... Do you mean it's "resume download" feature?
Re: Session sharing for download managers?
Posted: Mon Jun 29, 2009 2:27 pm
by Eric!
VladSun wrote:
Yes, they are sharing the same cookie, with the same session ID stored in it.
How does the new instance share this?
VladSun wrote:
I'm not sure what you mean by download managers in this case... Do you mean it's "resume download" feature?
These are plug-in or stand alone download accelerators which can open streams from multiple server mirrors (I'm just doing it on one server) to speed fie transfers. Firefox has a small one built in and the only feature is pause/continue.
If I allow downloads to only authorized sessions, the download tools are blocked. I would like to find a way to share the session, if possible. I am hoping there is a standard method for this between applications.
Thanks for helping, I know it's probably outside the normal php relm.
Re: Session sharing for download managers?
Posted: Mon Jun 29, 2009 6:32 pm
by BornForCode
This is a server side, and is not related to php.
Try to look for something called: HTTP Status: 206 Partial Content and Range Requests.
Information that you server is sending should look like:
Code: Select all
HTTP/1.0 200 OK
Date: Mon, 05 May 2008 00:33:14 GMT
Server: Apache/2.0.52 (Red Hat)
Accept-Ranges: bytes
Content-Length: 3980
Content-Type: image/jpeg
Re: Session sharing for download managers?
Posted: Mon Jun 29, 2009 9:50 pm
by Eric!
BornForCode wrote:This is a server side, and is not related to php.
Try to look for something called: HTTP Status: 206 Partial Content and Range Requests.
No, I know all about this for supporting resumed downloads.
I'm talking about sharing a php session with a download accelerator. Like opening a second instance of a browser and having it automatically share an active session.
Re: Session sharing for download managers?
Posted: Tue Jun 30, 2009 12:43 am
by VladSun
Eric! wrote:VladSun wrote:
Yes, they are sharing the same cookie, with the same session ID stored in it.
How does the new instance share this?
A cookie is a file - every instance of the browser can read it.
Eric! wrote:VladSun wrote:
I'm not sure what you mean by download managers in this case... Do you mean it's "resume download" feature?
These are plug-in or stand alone download accelerators which can open streams from multiple server mirrors (I'm just doing it on one server) to speed fie transfers. Firefox has a small one built in and the only feature is pause/continue.
If I allow downloads to only authorized sessions, the download tools are blocked. I would like to find a way to share the session, if possible. I am hoping there is a standard method for this between applications.
Thanks for helping, I know it's probably outside the normal php relm.
You may pass the session ID as a GET parameter and initialize the session with it.
This will work on a single server and as long as the session is active.
Re: Session sharing for download managers?
Posted: Tue Jun 30, 2009 4:38 am
by BornForCode
Then the load is moved on your download accelerator tool.
You must ensure that the download accelerator can read/create the cookies. Some download accelerators are able to authenticate (if you provide user and password) and start downloading using session sharing.
Re: Session sharing for download managers?
Posted: Tue Jun 30, 2009 8:26 am
by Eric!
VladSun wrote:You may pass the session ID as a GET parameter and initialize the session with it.
This will work on a single server and as long as the session is active.
Yes, that's right. I am stupid. Put the session id in the URL. Duh. Thanks for clearing the fog....