Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Remote Logging out


Remote Logging out

Author
Message
shiva
shiva
Forum God
Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)

Group: Forum Members
Posts: 192, Visits: 74
Hi Frenz,

        I am building an application for cyber cafe... so i want to maintain a server application where in all the user system will be under this... In server i want to set time to a particular user can work for this many hours or i can extend it... once times up the user system should logout controlling from server sys... Plz give me some idea or suggest how can i go for... Thanx in advance

G.Shiva Shankar

DougT
DougT
Forum God
Forum God (1.6K reputation)Forum God (1.6K reputation)Forum God (1.6K reputation)Forum God (1.6K reputation)Forum God (1.6K reputation)Forum God (1.6K reputation)Forum God (1.6K reputation)Forum God (1.6K reputation)Forum God (1.6K reputation)

Group: Forum Members
Posts: 12, Visits: 99
Hi,

The easiest way is to close the connection from the server once a user has consumed the amount of time you allocate. You should also issue some sort of warning to the user if they are getting near the limit and to yourslef if you want the ability to increase the limit. Once a user loggs on you could start a timer, associated with that user, which counts down and then triggers the warning, say 5 minutes before expiration of their session, then start up another one for 5 minutes (or for the length of time you wish, if you are going to extend it) and when that triggers close the socket / port for that user.

Regards

Doug

major
major
Forum God
Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)

Group: Forum Members
Posts: 367, Visits: 100
This is very easy to do but involves a few hours of code. You will need to create a multi server/clinet app. There are other ways to connect in a network. You will alos need to have a database, Depending on the number of computers connected, chose the database type accrodingly. The time setting should be stored on the database. When the client app's time has expired it should report to the server app telling it that the time has expired. Client app will then log off but still remain connected to the server. Then when u want to add more time to the users account simpley ask the user for theere code and then add more time to the datbase. Sorry im in a bit of a rush so I dont have much time to expplain.



shiva
shiva
Forum God
Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)

Group: Forum Members
Posts: 192, Visits: 74
Thanx Doug and Major,

          I have got the same idea as u told Doug. But what i want is how to operate the user system thru the server and how to calculate the amount with the time in server... Major plz feel free to help me. Thanx

       

G.Shiva Shankar

Sunil KC
Sunil KC
Forum God
Forum God (19K reputation)Forum God (19K reputation)Forum God (19K reputation)Forum God (19K reputation)Forum God (19K reputation)Forum God (19K reputation)Forum God (19K reputation)Forum God (19K reputation)Forum God (19K reputation)

Group: Forum Members
Posts: 209, Visits: 145
Hi Shiva,

I think you should use winsock for this operation.

Please search some winsock code in this site, you will get some idea for this.

skc

____________
Sunil KC
http://www.sunil.com.np

Bharathi
Bharathi
Forum God
Forum God (11K reputation)Forum God (11K reputation)Forum God (11K reputation)Forum God (11K reputation)Forum God (11K reputation)Forum God (11K reputation)Forum God (11K reputation)Forum God (11K reputation)Forum God (11K reputation)

Group: Forum Members
Posts: 74, Visits: 125
Hi,

TRy this link to master Client/Server programming.

Regards

 bhar


Books for Programmers
http://www.vkinfotek.

shiva
shiva
Forum God
Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)

Group: Forum Members
Posts: 192, Visits: 74
Hi Bharathi,

         There is no link... plz help me frenz

G.Shiva Shankar

major
major
Forum God
Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)

Group: Forum Members
Posts: 367, Visits: 100
I have acttached a multi chat program that I wrote a while ago. There is a server and u can have multipe windows of the client. All clients can connect to the server. You will have to modify the code serverly becuase it was written as multi chat program. Meaning coloring of text font size , also it allows users to register and then login. When u download the file, runn the server project first, this is in the main folder, there is a sub folder called client where it has the cleint project. Run them seperatly.



Tips: allow the client to send a text based message to the server, this message will include, the curent state of the client and that the time has expired, send the message like this "RT:234,code:1234"



Then use the split function to split the message at every comman. store the splitted text into a varibale, like this



Remaining_time = "RT:234"

passcode = "code:1234"



RT stand for remaining time, in this case is 234, example in seconds. U can remove the TR and just leave it with the number when u send the message such as "234,1234", but its good to know what the numbers means. 1234 is the passcode for the user who logged on.



Sorry i cant explain it propery. Here is the attachment. Delete all the unnessary stuffy from the code, such as text color, font size to leave u with the main structure of the code.




Attachments
chat.zip (450 views, 38.00 KB)
shiva
shiva
Forum God
Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)Forum God (8.4K reputation)

Group: Forum Members
Posts: 192, Visits: 74
Hi Major,

             Thanx for ur reply... Just gimmie some idea or Some API's where in

i) i can find what all systems are connected through network. Once a system logs in then that system name and log in time should save in server database. I want to view all the systems in network in a flex grid. And

ii) one more thing is that how can i make log out of the system which is in network through the server?

Just depending these questions gimmie some solution. Will be waiting for replies.

G.Shiva Shankar

major
major
Forum God
Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)Forum God (37K reputation)

Group: Forum Members
Posts: 367, Visits: 100
Hi shvia, I think u are over complicating thins. Star with a small foundation first. U really dont need to use API to connect to a network as u can use the winsock. you can find tutorials on this web site www.winsockvb.com, here is a link to a person to person chat



http://www.winsockvb.com/article.php?article_id=15



Read the tutorial first once u can make a person to person chat, then read the following tutorial



http://www.winsockvb.com/article.php?article_id=18



The tutorial will explain how to make multiple connections to many clients using one server.



After his part u have a foundation of ur network, where by u can pass messages to the server. Meaning all the clinets can pass data to the server.



From this point onwards start the database side. Create a database on the server machine. Every time a client sends the server a message store that message into the database. You can have a string message that is delimtinted using exmaple "-", then use vbs split function to split this string. store each splitted string into ur database.



This should be the process



Client logs onto the program using a pass code. At this stage the program is connected to the server already. (When the computer is switched on ur program should automatically load and connect to the server and remain connected until the computer is switched off)



The clinet will send a message to the server telling the server this is my pass code. The server will look into its database and check to see if that pass code sent by the client is authentic. If it is authentic, the pass code should be associated with a duration time. The reason for this is because if a customer says I want to use internet for 1 hour how will the program know to expire in 1 hour. So Example



passcode:1234 Duration:30 mins

passcode:2332 Duration: 30 mins

pascode:7845 Duration: 1hour



So basiclly each passcode should be assigned with a duration time. So u code generate pass codes that have a duration of 30 mins and passcodes that have a duration of an hour.



Any way after the passcode is authenticated, the server will send the client a message saying, okay ur authenticated and ur duration is 30 mins. The message the server sends to the clinet could look like this "Auth:YES-Dur:1800000". This messages will tell the client computer "YES" code is authentic and duration is "1800000" seconds which is 30 mins.



The user will then be allowed to browse the internet. When 25 mins is gone, tell the customer they have 5 mins left and continue reminding the user possibly with flashing red colored text.



If in the last remaining 5 minutes the customer whats to extend there session buy another 30 mins or an hour. The amin will ask the customer for there passcode, the admin will then find the pass code on the database and add 30 mins or an hour. This update should then automatically be send to the customers computer. the remaining time should then be updated with the new time.



Undertake as much analysis as possible. Remember the last thing u want to do is keep having to modify ur code to add new things that u forgot to add.



You will need to generate a list of pass codes. To make ur system as friendly as possible u should really have a quest system and a membership system. The guest system should use pass codes, where the membership should allow custmers to register and chose a username and password. Ideally, this should be for the regular people who come in often to browse the internet, but i dont know about the setup of the business u are making it for business.



Remember this, when sending messages to the server and server to client, try to send as much information in one trasmit. Meaning if the server is sending a message, dont let the server send 2 different messages one after the other when u can put the 2 messages in one message a transmit. Typically it should be cleint transmit, server transmit, client transmit, server transmit.



This will mean u are sending less packets through the network, where as if u didnt some thing like this

client transmit, client transmit, server transmit, server transmit, client transmit, client transmit, server transmit, server transmits,



U can combine 2 different message sinto one trnamit, to reduce the number of packets being sent through the network, this should avoid packet collision.



Okay I wrote a lot. So plan ur structure out, if u dont do this u will face many probelms. And read those tutorials I gave u.
















GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search