Jump to content

Possible?


Kristian_C

Recommended Posts

To get a notice when an session is beeing started? And etc get the name/thing that is beeing started? like i login to msn then a session is beeing started and passed thru a type of db so my contacts can see this...how can i make sort of the same thing?..->Kristian_C.

Link to comment
Share on other sites

hehe, i dont want to see the user online, or i want but thats not a problem, i need popup window that closes after 3seconds or something when a user login to the site...I can use sql/php to do it but that whould take so long time with my skills :)...chould update a collum in the user table then make it go to another status after some seconds then show the popup while the time counts down... But i really dont have an idea of how to display the popup with the actual username ++ on the screen to the other guy..So thats the problem.. ->Kristian_C.

Link to comment
Share on other sites

for the popup to contain the username etc. I imagine you'll either need to set it on page load, or use AJAX.the popup window would be fairly simple to create. There's an article on the javascript forum about centering a div; width and height. Then just use javascript timing to remove the popup after a number of seconds.

Link to comment
Share on other sites

for the popup to contain the username etc. I imagine you'll either need to set it on page load, or use AJAX.the popup window would be fairly simple to create. There's an article on the javascript forum about centering a div; width and height. Then just use javascript timing to remove the popup after a number of seconds.
Yeah, i can do the popup, and time it, was reading about it for a few days ago, but the problem is how to display the popup at the other users screen..like how to get the session thing, may just use sql/php tho, if it aint no other ways, but yeah.->Kristian_C.
Link to comment
Share on other sites

I want my users to be able to see when their friends comes online. easy and simple... what i can do is to just have a system so the users can get a message when their friends logs on, but thats not something i want :) i want something more fanzy, and i know it is possible somehow..->Kristian_C.

Link to comment
Share on other sites

Search the PHP forum for custom session handlers. There is a post by my with the code you need to implement your own session handlers that use a database to store the session information instead of the server's default session handling. Once sessions are stored in the database, then you can query the database to find out how many sessions are open and what information is in them.Here's the thread I'm talking about, search wouldn't find it:http://w3schools.invisionzone.com/index.php?showtopic=9731

Link to comment
Share on other sites

Thanks, but how do i display etc an echo over at the other users screen if you understand what i meen?..The thing is how to display that a session starts, and i need to display at 1-20 users screen...Since the max limit of contacts are 20.if you can help me out with how to select from those sessions, then return it somehow with JS.Just need to understand how to return it actually, js i think i can sort out myself.in case you need some info to help :session name : brukernavn.contact table : kontakter.select from contacts will be :select * from kontakter where brukernavn=$brukernavn contacts = kontakt.....Hope you or someone else can help me figure this out :).->Kristian_C.

Link to comment
Share on other sites

The users will have to check for it, you can't just send them data. They need to send a request first. So they will need to be set up to ask the server for session information every 15 seconds or whatever you want, and the server will need to get the information from the database and send it back to the client.You could set it up so that it sends everyone whose session started within the last minute or so, and they could be marked as "new" on everyone else's page. And then it sends everyone else who is online but not new. I guess you can do it however you want to do it, the first thing you need to figure out is exactly how you want it to work.

Link to comment
Share on other sites

The plan was to do like a msn thing, but in this case it seems to be harder since i really dont know so much about php yet as im still a neewbie, but maybe ill just do as you say and make it possible for every one to see who logs on. just have a little list over the 5last logins up in the corner of page or something like that.... if i then use your code, does it register the session it self? or must i do something? in case of that, what must i do?.And will it empty the session itself when a session is beeing emtpyed? in a easyer why, will it self delete from the db?..->Kristian_C.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...