線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:2135
推到 Plurk!
推到 Facebook!

怎樣可以讀寫cookie

答題得分者是:Stallion
KFC123_60201
一般會員


發表:58
回覆:18
積分:15
註冊:2006-07-25

發送簡訊給我
#1 引用回覆 回覆 發表時間:2008-05-24 09:16:49 IP:139.78.xxx.xxx 訂閱
在系統的 Documents and Settings\user\Local Settings\Temporary Internet Files 目錄下有一些帶 cookie:user@ 開頭的 cookie 文件,怎樣才能通過 delphi 把它讀出來?怎樣可以通過 delphi 改變它的內容?
Stallion
版主


發表:52
回覆:1600
積分:1995
註冊:2004-09-15

發送簡訊給我
#2 引用回覆 回覆 發表時間:2008-05-24 11:34:01 IP:75.35.xxx.xxx 未訂閱
1. cookies directory is located in each username directory, like c:\Documents and Settings\username\cookies.
2. cookies files are text file, open them with assign, reset, rewrite...etc.
===================引 用 KFC123_60201 文 章===================
在系統的 Documents and Settings\user\Local Settings\Temporary Internet Files 目錄下有一些帶 cookie:user@ 開頭的 cookie 文件,怎樣才能通過 delphi 把它讀出來?怎樣可以通過 delphi 改變它的內容?
KFC123_60201
一般會員


發表:58
回覆:18
積分:15
註冊:2006-07-25

發送簡訊給我
#3 引用回覆 回覆 發表時間:2008-05-24 13:13:29 IP:139.78.xxx.xxx 訂閱

===================引 用 Stallion 文 章===================
1. cookies directory is located in each username directory, like c:\Documents and Settings\username\cookies.
2. cookies files are text file, open them with assign, reset, rewrite...etc.
謝謝回復。我是想實現以下功能。首先,有一個website可以通過cookie來記錄登錄信息來實現自動登錄登錄, cookie 的有效期是700天。我首先在Temporary Internet Explorer 中找到它的cookie(對應放在c:\Documents and Settings\username\cookies中),把它copy下來,然後把它刪除,再打開網頁自動登錄就沒有了,我再把網站關掉,把cookie copy回去cookies目錄中,奇怪的是,我并有改變cookie的內容,但copy回去還是不能自動登錄。
Stallion
版主


發表:52
回覆:1600
積分:1995
註冊:2004-09-15

發送簡訊給我
#4 引用回覆 回覆 發表時間:2008-05-25 06:40:16 IP:75.18.xxx.xxx 未訂閱
Be aware of "FILE TIME", web programming use that to determine cookie's live time is due or not, which means when you deleted it and copy it back, the file time is different.
Notice that file time(s) means created , last modified and accessed time, please search this site for more information, it should have an example to show you how to update file time.
===================引 用 KFC123_60201 文 章===================

===================引 用 Stallion 文 章===================
1. cookies directory is located in each username directory, like c:\Documents and Settings\username\cookies.
2. cookies files are text file, open them with assign, reset, rewrite...etc.
謝謝回復。我是想實現以下功能。首先,有一個website可以通過cookie來記錄登錄信息來實現自動登錄登錄, cookie 的有效期是700天。我首先在Temporary Internet Explorer 中找到它的cookie(對應放在c:\Documents and Settings\username\cookies中),把它copy下來,然後把它刪除,再打開網頁自動登錄就沒有了,我再把網站關掉,把cookie copy回去cookies目錄中,奇怪的是,我并有改變cookie的內容,但copy回去還是不能自動登錄。
系統時間:2024-04-19 18:30:13
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!