全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1788
推到 Plurk!
推到 Facebook!

如何用 TIdHTTP 取得 Session 的資訊

尚未結案
zaguan
一般會員


發表:11
回覆:18
積分:10
註冊:2002-03-31

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-03-31 02:05:08 IP:203.204.xxx.xxx 未訂閱
請教大家,如何用 TIdHTTP 取得 Server 的Session 資訊? 謝謝!
flyup
資深會員


發表:280
回覆:508
積分:385
註冊:2002-04-15

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-03-31 09:33:16 IP:61.217.xxx.xxx 未訂閱
TIdHTTPDefaultSessionList.GetSession Retrieves a persistent HTTP session having the specified ID and remote IP address. function GetSession(const SessionID: string; const RemoteIP: string): TIdHTTPSession; override; Parameters const SessionID: string Session identifier to be located. const RemoteIP: string Optional remote IP address for the session. Returns TIdHTTPSession - Persisten session retrieved from the container. Description GetSession is a TIdHTTPSession function used to retrive a persistent HTTP session having the remote IP address and session identifier specified in SessionID and RemoteIP. GetSession insures that the internal thread list is locked prior to accessing sessions in the container. GetSession will iteratively search through all sessions in the container until a session is located with the specified SessionID and RemoteIP. If RemoteIP contains an empty string, the first session with the same session identifier is used. When a session is located for the session identifer and remote IP address, the session is timestamped for last access to prevent purging as a stale session. The return value for GetSession can contain Nil when a session cannot be located with the specified values. GetSession will unlock the internal thread list prior to exiting from the method. 因為你!再大的難題,更顯得容易!
zaguan
一般會員


發表:11
回覆:18
積分:10
註冊:2002-03-31

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-03-31 16:00:28 IP:203.204.xxx.xxx 未訂閱
TIdHTTPDefaultSessionList.GetSession 好像是Server端用的耶! 我想要從Client端獲取Session資訊,有辦法嗎? (抱歉,我對於Session的觀念可能不是很清楚,請不吝賜教!)
zaguan
一般會員


發表:11
回覆:18
積分:10
註冊:2002-03-31

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-03-31 23:30:57 IP:203.204.xxx.xxx 未訂閱
引言: TIdHTTPDefaultSessionList.GetSession 好像是Server端用的耶! 我想要從Client端獲取Session資訊,有辦法嗎? (抱歉,我對於Session的觀念可能不是很清楚,請不吝賜教!)
在我詢問過高手的意見後,發現這件事是不可能的! 不過可以透過 CookieManager 取得 ServerCookie 以及 ClientCookie! 如果Server採用的是Session的方式! 我們頂多只能在CookieManager中,得到加密過後的SessionID! 以上是我的心得,如有錯誤,請指正!
Ktop_Robot
站務副站長


發表:0
回覆:3511
積分:0
註冊:2007-04-17

發送簡訊給我
#5 引用回覆 回覆 發表時間:2007-04-26 13:52:48 IP:000.000.xxx.xxx 未訂閱
提問者您好:


以上回應是否已得到滿意的答覆?


若已得到滿意的答覆,請在一週內結案,否則請在一週內回覆還有什麼未盡事宜,不然,
將由版主(尚無版主之區域將由副站長或站長)自由心證,選擇較合適之解答予以結案處理,
被選上之答題者同樣會有加分獎勵同時發問者將受到扣 1 分的處分。不便之處,請見諒。


有問有答有結案,才能有良性的互動,良好的討論環境需要大家共同維護,感謝您的配合。

------
我是機器人,我不接受簡訊.
系統時間:2024-05-04 19:42:30
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!