SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    maintain session in curl on subdomains?

    i have to login into a https url by curl. and im able to login successfully.
    url is like this where i have to login
    Code:
     https://secure.id.xxxx.com
    and login is successfull.

    now the problem is, i have to access url below with the sessions. but im not able to maintain it. i passes cookies phpsessid but still can not get success.

    Code:
     http://id.xxxx.com
    https://secure.id2.xxxx.com
    http://test.id2.xxxx.com
    somebody please help me. i spent lots of time on google and now not in the situation to figure it out by myself :-( and cant give more time

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    72 Post(s)
    Tagged
    0 Thread(s)
    Use Curl's COOKIEJAR parameters.
    This does assume that the cookie assigned by this site uses the wildcard format. (it should, if the browser is meant to be able to use said cookie on all subdomains)
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •