Print Page | Close Window

Cookie question

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=25350
Printed Date: 29 March 2026 at 9:41pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Cookie question
Posted By: freakdaddy
Subject: Cookie question
Date Posted: 27 February 2008 at 8:33am
It appears that the cookies for WWF are stored based off the forum directory name. How would I access this then? If I change it so the forum stores the cookies from /, then I have no issues. Code like this would work fine:
name = Trim(Mid(Request.Cookies("WWF9sLID")("UID"), 1, 44))

How do I grab the UID if WWF places the cookie in the forum folder?

Thanks for any help.



Replies:
Posted By: Scotty32
Date Posted: 27 February 2008 at 9:33am
If you look in the Settings file in the includes folder, you can change this to the root of the website.

-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: freakdaddy
Date Posted: 27 February 2008 at 8:15pm
Yeah, I saw all this, but when I tried it, it didn't seem to login people anymore. Is there a syntax that someone knows for allowing it to be in the forum folder, and access it?

I know others have had issues, that's why I'm asking.


Posted By: freakdaddy
Date Posted: 28 February 2008 at 7:23am
Bruce - any idea about reading it from the directory you have set? 


Posted By: Scotty32
Date Posted: 29 February 2008 at 2:10pm
I have sucessfully changed it on my own websites.

You comment out the one that fixes it to the forum folder (add a ' at the start of the line)
And you remove the comment ( ' ) from the start of the line that looks like :

'strCookie = "/"

You will need to log out and log back in for it to take affect.


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: freakdaddy
Date Posted: 01 March 2008 at 1:55am
Hi - yeah, like I said, I tried this from the start, and I had no problems getting the info from the cookie, and it worked fine, however it wouldn't log me in.

I just tried it again though, and I had the same issue occur, but this time I deleted all of the cookies for the site, and then tried to re-login, and it was fine.

Just have to let all the members know about this I guess, and then change it. Thanks.


Posted By: nekengren
Date Posted: 12 May 2008 at 9:08pm
Scotty,
 
Yes, the changes to strCookiePath do work.  Cookies get set at different path levels successfully.  However, the actual string cookie value such as
WWF9sLID=UID=loginuser8Z9B6D1BZ2
always has the suffix.  I'd really like to retrieve just the 'loginuser' string for the other applications I am going to integrate.  I suppose I should experiment and see if that suffix is always the same length so I can strip if off.
 
Neal


Posted By: WebWiz-Bruce
Date Posted: 13 May 2008 at 8:25am
The suffix as you call it is actually the cookie key, you use the cookie key to retrieve the part of the cookie you need.

cookie = Request.Cookies(CookieName)(CookieKey)


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: nekengren
Date Posted: 13 May 2008 at 1:29pm
Well I think maybe you didn't understand my post.  As an example
 
response.write request.cookies("WWF9sLID")("UID")
produces the response
 
nekenxxxxxxxxxxxxx
 
The value is the login+suffix (some kind of encryption key?)
 
I want just the login part of the value.


Posted By: WebWiz-Bruce
Date Posted: 13 May 2008 at 1:40pm
The login is not kept in a cookie, what you are seeing is an autologin cookie which can sometimes contain parts of the username.

The 32 bit session tracking code is stored in another cookie, this is used to track users around the forum but only lasts for a 20 minute period.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: nekengren
Date Posted: 13 May 2008 at 3:33pm

hmmm.  Well, if you say so.  However, I don't see it.  I dump the Session collection which has only one item when logged in.

dtmUnReadPostCheck=2008-05-13 10:21:54
The complete Cookies collection is
 
Removed for security

Also, normally Session.SessionID is just a meaningless encrypted string ASP creates to track visitor sessions in memory.


Posted By: WebWiz-Bruce
Date Posted: 13 May 2008 at 3:56pm
If you explain what it is that you are trying to achieve maybe able to help.

The 'WWF9sID=SID' cookie contains the forums own 32 bit session tracking code. It uses it's own session tracking rather than the ASP one as this allows it to be more secure and flexible and also allows Web Wiz Forums to be used with load balanced servers and server farms as you can switch the session to be stored in the database rather than the servers memory.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: nekengren
Date Posted: 13 May 2008 at 4:07pm
I just want the login.  without extra characters attached.  I can't do custom queries on the WebWiz tables if I don't know the key.
 
 
Thanks.


Posted By: WebWiz-Bruce
Date Posted: 13 May 2008 at 4:50pm
It sounds like you would be better of using the built in HTTP XML API.

This is a very powerful API which can be used to talk directly to web wiz forums and can return full details on members like their login code which you can then place into a cookie to auto-login the user to Web Wiz Forums, as well as other details which you can use in your custom quires including the Aurthor_ID which is what is used in Web Wiz Forums own SQL when updating details of a member.

For a full list of methods and actions point your browser as the HttpAPI.asp file in the root of your forum.

The API can be used for many things including adding new members, updating passwords, and many other things. I believe there is around 20 different actions that can be performed with the API at the present time.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: nekengren
Date Posted: 13 May 2008 at 6:33pm
yes, I may want to use the XMLAPI.  Thanks.
 
I did some investigation and discovered I can use the
cookie WWF9sLID UID  to query for tblauthor.user_code which gives me the wanted tblauthor.username
 
tblauthor.user_code  and cookie WWF9sLID UID   change with each login.
 


Posted By: WebWiz-Bruce
Date Posted: 14 May 2008 at 8:26am
Probably best to use the API as this way you can query Web Wiz Forums and get the Author_ID for a member which never changes.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net