Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - how to login user with HTTPXML API?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how to login user with HTTPXML API?

 Post Reply Post Reply
Author
tjodalv View Drop Down
Newbie
Newbie


Joined: 03 May 2006
Location: Croatia
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote tjodalv Quote  Post ReplyReply Direct Link To This Post Topic: how to login user with HTTPXML API?
    Posted: 17 July 2010 at 5:18pm
Hi

I just downloaded copy of Webwizforums, and I want to keep my users in WWF database, but I want to have my own login and registration form.

I created my login form, so basically i want to check if user exists in WWF database, and if exists then log in user.

I am using LoginMemberCookie method, and i get this response:

<ApiResponse> 
 <ErrorCode>0</ErrorCode> 
 <ErrorDescription/> 
 <ResultData recordcount="1"> 
  <Record> 
   
   <Username>Administrator</Username> 
   <UserID>1</UserID> 
   <CookieName>WWF9sLID</CookieName> 
   <CookieKey>UID</CookieKey> 
   <CookieData>administrator-Z2DF-5C9-B31B-92ZA</CookieData> 
   <CookiePath>/forum/</CookiePath> 
   <ForumPath>http://127.0.0.1:92/forum/</ForumPath> 
  </Record> 
 </ResultData> 
</ApiResponse>

I am not sure what should I do with this data. When I write a cookie like this:

response.cookies(cookie_name)(cookie_key) = cookie_data
response.cookies(cookie_name).path = cookie_path

I am still not logged in into forum. I want to be able to login user to forum through my login form. Please tell me how.


P.S.
I am also having problem with GetMemberByID method, when I make request I get an error:


<font face="Arial" size=2> 
<p>Microsoft VBScript runtime </font> <font face="Arial" size=2>error '800a000d'</font> 
<p> 
<font face="Arial" size=2>Type mismatch: 'Server.HTMLEncode'</font> 
<p> 
<font face="Arial" size=2>/forum/HttpAPI.asp</font><font face="Arial" size=2>, line 327</font>

I didn't made any changes to forum. Just for the record.


Edited by tjodalv - 17 July 2010 at 5:22pm
Back to Top
123Simples View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
Post Options Post Options   Thanks (0) Thanks(0)   Quote 123Simples Quote  Post ReplyReply Direct Link To This Post Posted: 17 July 2010 at 6:39pm
If you read through this page here it may help you. Personally I've not tried it but Web Wiz Bruce, Scotty32 and many others here are much more inclined to be able to give you a better answer
Back to Top
tjodalv View Drop Down
Newbie
Newbie


Joined: 03 May 2006
Location: Croatia
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote tjodalv Quote  Post ReplyReply Direct Link To This Post Posted: 17 July 2010 at 6:47pm
Yes I know about that, but for that login method I need user e-mail, but in time of login i don't know user e-mail, so, after calling LoginMemberCookie to authenticate user I need to call GetMemberByID method to retrieve user e-mail, but that method is not working (read my first post, P.S. part)

If i cannot login to forum with LoginMemberCookie method, I don't understand what that method is used for.

Thanks!
Back to Top
123Simples View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
Post Options Post Options   Thanks (0) Thanks(0)   Quote 123Simples Quote  Post ReplyReply Direct Link To This Post Posted: 18 July 2010 at 6:30pm
Okay tjodalv

Hopefully Bruce can give you the right answer as this bit is above me I'm afraid
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2010 at 1:52pm
The LoginMemberCookiegives you the data you need to create your own cookie so that after the cookie is created the member can browser to the forum without logging in.

The main parts you need to create the cookie are:-

CookieName - This is the Name of the cookie you need to create
CookieKey - This is the key within the cookie that the data is stored under
CookieData - This is the data that you store under the cookie key

The cookie should look like

WWF9sLID
UID=administrator-Z2DF-5C9-B31B-92ZA

You also have additional data such as the cookie path, in case you also want to include that in the cookie.
Back to Top
tjodalv View Drop Down
Newbie
Newbie


Joined: 03 May 2006
Location: Croatia
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote tjodalv Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2010 at 4:04pm
Please look at my first, post. After I create cookie and navigate in browser to the forum I am not logged in ...

Also can you tell me why I get an error when I use GetMemberByID or GetMemberByName method. I am interested to buy the forum, but it concerns me that the API, an thoose errors.

Thank you !
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2010 at 5:07pm
The only reason why can think the cookie does not work is that you must be creating it wrong. Also you should note that cookies can only be read in by the domain that set the cookie, so you can not set a cookie for another website or sub domain.

Have tested the etMemberByID or GetMemberByName method and can not find any problems with them. It maybe that the member was not created properly in the database or that it is something else wrong with the account you are trying to get.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.