title: CURL and session Id
body: <p>There is site A that should use site's B authentication. At site A I added login.php with curl's post request to site B. Also at site A I have jquery Ajax request to that login.php. If there are no errors I redirecting the user to site B (in javascript). Everything fine except of fact that after redirection the user is not authenticated because there is no any session cookie. So my idea is to read session Id from curl request at login.php and add a cookie with that session Id. I think it will solve my problem.
  So the question is - how to read session Id from curl?
  Thank you</p>