Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Parse cookie header (https://www.delphipraxis.net/151033-parse-cookie-header.html)

mohfa 3. Mai 2010 23:19


Parse cookie header
 
Hi i need your help in reading cookies entry ;

let's take this cookie text :
//************************************************** **********//
__utma
95979358.1395260604.1270034198.1270034198.12712433 55.2
speedbit.com/
1600
3693996222
30218515
3943881123
30071746
*
__utmz
95979358.1270034198.1.1.utmcsr=(direct)|utmccn=(di rect)|utmcmd=(none)
speedbit.com/
1600
1564981312
30105644
2708999424
30068931
*
__utmb
95979358.1.10.1271243355
speedbit.com/
1600
461544704
30071751
3943881124
30071746
*

//************************************************** **********//

i want to read the __utma , __utmz , __utmb values from IE Cookies

thank you all

himitsu 4. Mai 2010 06:10

Re: Parse cookie header
 
Delphi-Quellcode:
SL := TStringList.Create;
SL.Text := '...';

i := SL.IndexOf('__utma'); // search the name
S := SL[i + 1];            // read the value from next line
// S = '95979358.1395260604.1270034198.1270034198.1271243355.2'


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:54 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz