How can I send PHPSESSID in the URL?

前端 未结 4 1664
终归单人心
终归单人心 2020-12-07 02:07

I\'m trying to send the PHPSESSID via a HTTP GET variable for a cookie-less client.

I\'ve seen this in various drupal implementations where ?PHPSESSIONID=123AB

4条回答
  •  醉话见心
    2020-12-07 02:44

    Doing it manually:

    if ($_REQUEST['token'])
      session_id($_REQUEST['token']);
    session_start();
    
    print("foo=".$_SESSION['foo']++."
    ". "link
    "); print("
    ". "". "
    ");

提交回复
热议问题