• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

Login to a forum with two account

I want to write a small browser like GreenBrowser or Avant Browser us TWebbrowser component. But a problem that I can't use it to access a forum with two account. when I login in a browser, it's mean that I logged in another. How to disable that (in order to login with two or more account)?
0
coldboy
Asked:
coldboy
1 Solution
 
Ivanov_GCommented:
maybe it use a cookie, which is loaded by the second browser ... ?
0
 
aikimarkCommented:
Q: can you do the dual login manually from two browser windows?

Depending on your OS, you might be able to start the second browser under a different userID.  If so, that might send the cookies to a different Temporary Internet Files directory and get around any potential cookie overwrite problem.

It may be that the web site you are visiting will only service one userID from one IP address at a time.  If this is the case, your solution will be much more complicated.
0
 
SJohnsonCommented:
>Q: can you do the dual login manually from two browser windows?
Not with IE you can't.  With is what the TWebBrowser component is a wrapper of.  

AFAIK, there's no way of doing this short of disabling cookies.  But then, everyone who used your app would have to do the same, and I'm kind of partial to my cookies :)
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
coldboyAuthor Commented:
Certainly, my browser based on TWebBrowser component.
When I use IE, I can login to a forum by two or more account, (may be because each browser run with a different processID?). But when I use GB or AB, I can't do the same (may be because every browser run with the same processID?). if it's related to cookie or the web site I'm visiting, why the one is able while the orther is not?
0
 
SJohnsonCommented:
>if it's related to cookie or the web site I'm visiting, why the one is able while the orther is not?
I don't know, but sites rely on a cookie to do things like automatic logins, and it won't care at all about the processID as that's local information and completely irrelevant on the server.  So, unless your browser has some way of providing a unqiue machine/user id for each TWebBrowser, I have no idea how it will work.  

The only thing I can think of is you've disabled cookies and it's using a session variable for each TWebBrowser.  If this is the case, then when you close and reopen the browser, you'll need to log into each instance of that site again individually.  If you have done this, then ever browser should have the same result.
0
 
coldboyAuthor Commented:
I know on PHP, there's a thing called PHPSessionID. I think I can login by two account at the same time by generate two PHPSessionID. Any Idea? Some site won't work if cookies is disabled! So I don't want to disable cookies
0
 
SJohnsonCommented:
A PHP Session ID is server side.  You have no control over it from the client (in fact, it'll know nothing about it).  So, if you log into a site with user ID 1 in one browser window, then open browser window #2 and login with user iD 2, it'll probably work as both windows have their own session ID.  ____BUT____ if you close either or both windows, you'll lose your login details.

IF the remote site is using cookies, then if you login using user ID 1, then open browser windows #2 and login with user ID 2, the cookie created with user ID 1's details will be overwritten using user iD 2's details.  It's the way cookies work.

So, I'm pretty confident in saying what you're trying to achieve is impossible.  Unless you disable cookies (and then you use the automated login feature cookies gives you when you open that URL again).


Stu
0
 
coldboyAuthor Commented:
Please try this:
Open IE->login in EE with an account
Open IE again(uses command, not Ctrl+N). Do you logged in this browse? (certainly, disable auto login first!)
Thank for idea!
0
 
coldboyAuthor Commented:
Please try this:
Open IE->login in EE with an account
Open IE again(uses command, not Ctrl+N) and goto EE again. Have U logged in this browser? (certainly, disable auto login first!)
Thank for idea!
0
 
SJohnsonCommented:
I dont think you'll be able to do that as it's all cookie code generally done on the server side.  And enabling/disabling cookies to prevent or allow autologin would be very tedious for your user.

I've been using forums for about 10 years now, and fora lot of those forums I've used multiple logins (like with EE I have a busines login and a personal one), but I can't think of any reason at all for a person to need two simultaneous logins to the same site unless they wanted to chat to themselves :)  Can you tell me why you need to do this?

Stu
0
 
coldboyAuthor Commented:
certainly, I have my purpose, but I can't tell you it. The only thing i want is enable TWebbrowser to have two session as the same time! If you see my problem can't be solved, tell me!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now