Author
Topic: Retrieving Cookies ... (Read 2249 times)

Just a quick question ... I'm interested in using WebBatch to retrieve the values of certain browser cookies sent to the server. According to the TechDatabase, you would use WebDatData( "cookieName" ) to retrieve the value of a specific cookie. But that returns an error because the function signature of WebDatData is WebDatData( section, keyname, defaultValue ). So I am using WebDatData( 'SYSTEM', 'HTTP_COOKIE', '' ) and this retrieves all of the cookies, which I then have to loop through and inspect to find the ones I'm interested in.

I'm OK with that, but thought I would check to see if there was a more direct method.

I apologize, I seemed to have missed your original post. As I understand it, yes you will need to parse the various cookies. However they should be in a specific format which should make it easy to parse: http://www.w3.org/Protocols/rfc2109/rfc2109