LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the record of remote client ?

Hi, all
I has published front panel of a VI by using web publishing tool. I want to record the ip who has logined the page,and when does it login and log out. I know there is function in Web publishing tool to log the data into a file called'www'. But i dont want this one. I just want to log the data by writting another program Any one can give me idea about it? THANKS
0 Kudos
Message 1 of 4
(2,402 Views)
barry,

You'll want to use the Remote Panel Client Connections method of the VI for this. By "login," it isn't clear whether you mean "obtain control of the VI remotely" or whether you've got an actual login interface built into the VI panel.

Either way, you can make use of the method I mentioned. The Controller output will tell you whether there's currently a remote operator, and the Connections array will get you the remote address. You may have to use String to IP and IP to String from the TCP/IP palette to get dot notation for the remote address string.

Hope this helps,
John
Message 2 of 4
(2,394 Views)
hi Johnner,
thanks for your help. Sorry for causing you misunderstand. Login and log out ,actually i mean that i want to get the data when the client connet and close to it. yes,i can get the time of the client connecting to it from Remote Panel Client Connection ,but i cann't get when does the client close connection to remote panel. Can you give me idea about that? THANKS
0 Kudos
Message 3 of 4
(2,381 Views)
barry,

It seems as if you can get the info you need if you poll the Connections output of the Remote Panel Client Connections method (that is, call that method repeatedly and keep track of the way the output changes between successive calls).

When someone connects, you should see a new element/IP in the Connections array. When that person disconnects, you should be able to detect that his/her IP is no longer in the Connections array. It'll take a little bit over coding overhead, but if you want to build custom logging logic, it seems as if you have all the data you need.

If this is still not on target, feel free to follow up with another reply.

Regards,
John
0 Kudos
Message 4 of 4
(2,366 Views)