PDA

Click to See Complete Forum and Search --> : Detect if another computer is online


rockies1
Mar 15th, 2000, 11:35 PM
I need to detect if my home computer is online from work as it is serving as a game server...

Since I have a dynamic IP, I can not PING it...

I do, however, have ICQ on it...

Is it possible to query ICQ with my ICQ number and see if it it Online through VB6??

Thanks,

Mar 16th, 2000, 06:07 PM
Why not use icq for that?

Create a second account on your work, and add the ICQ Number you use at your home.

Think that that is way ez'r then creating an application for it.

btw, i believe you can download some dll's from icq(icq toolkit or something like that) maybe they make it possible to access icq

rockies1
Mar 16th, 2000, 07:41 PM
I can't use ICQ through our firewall at work, so in order to use it, I have to dial out to my ISP.

I can, however use:

<img src="http://online.mirabilis.com/scripts/online.dll?icq=12594475&img=10">

in an HTML document to see if it is online through the firewall...

I was hoping I could use something similar in VB...

Mc Brain
May 9th, 2000, 01:38 AM
You could try using the ICQ API that you can download from http://www.icq.com/api . It can't tell you exactly how to do it, 'cos I'm still dealing with the fuc.... functions. I ca't get the online list, yet. Tell me if you make it work.

razzaj
May 9th, 2000, 11:29 AM
There is a way to get ur ip address , not using asp .
ICQ must be running at ur home and in ur office .
Just send a message to ur home icq account from ur office computer . when the message is sent : go to msdos prompt
Run the following command :

netstat -n
(works for all versions of windows)

this command will list for u all connections established from ur computer, by doing that befor and after u send the message u can easily determine which one is ur ip at home .
(note : works even if user is invisible)


HTH
ps : of course u can always go to view-details-ipaddress in icq but netstat gives u more details aouthe connection like local and remote ports for each one

[Edited by razzaj on 05-10-2000 at 12:31 AM]

Mc Brain
May 9th, 2000, 01:23 PM
I don't think that might help me. I mean, I want my app to determine if the other person (actually the two of us) are online to run the proper function.

lychew
May 9th, 2000, 04:28 PM
Then try yahoo chat. I was told by my friend that it uses http protocol for connection. Then the firewall won't be able to block you.

Mc Brain
May 10th, 2000, 01:07 AM
I don't have any firewall problem. I can't even determine my online list. I mean, I open the ICQ call for the SetLicenseKey function (of the ICQ API) to enable the functions calls. But when I want to know the online list, I do get the number of person online, but the structure (Type variable) that should contain all the user info is empty. Any help??

LSanBoeuf
May 15th, 2000, 05:24 PM
Morgan;

There are two ways you can use VB to check for another computer being online. But first, as you already figured out, you need some fixed reference such as ICQ since you have a dynamic IP address.

Method #1: Write an ActiveX User Control, embed it in an HTML page, and open the page using IE4 or higher. The ActiveX User Control has an native method named AsyncRead and event named AsyncReadComplete. Give AsyncRead the fully-qualified URL to your home PC's ICQ online status page and AsyncType = vbAsyncTypeByteArray. In AsyncReadComplete AsyncProp.Value will contain a byte array of the targeted web page. You may have to run the byte array through the following code to make it legible;
<%
Dim sValue as String
sValue = ""
For i1 = LBound(AsyncProp.Value) To UBound(AsyncProp.Value)
sValue = sValue & Chr(AsyncProp.Value(i1))
Next i1
%>
Now parse the raw HTML text in the variable sValue to find the online status indicator for your home PC.

Method #2: Create a Standard EXE project with a single form. On that form add the Internet Transfer Control. On FormLoad or by explicit command (button click) initialize the properties of the INET control and invoke the OpenURL method targeting your home PC's ICQ online status page. Once you have the raw HTML you can parse it for the information you want, same as method #1. You mention a firewall at your office. If it also acts as a proxy and not just a filter, be sure to set INET.AccessType = icUseDefault. This will cause the control to evaluate your work PC's registry for the proxy server settings it needs to get through.

Let me know if this helps or you encounter any problems. I can probably help you out.

Regards,

Larry
(LSanBoeuf@compuserve.com)

billrogers
May 18th, 2000, 03:38 AM
Slick and easy,
I wont go into too much detail, but this is rather easy, and dont need any outside program such as icq or yahoo.

I did this to have my dynamic dsl ip act as a static one.

It would grab the ip of my home comp, write a html page and ftp it to my user space at my isp, i then could go to my user home page at my isp and see my address of my computer. you could also have it send an email to your work or a yahoo mail account.

It sometimes amazes me how cheap i can be for 10 bucks a month. :)

Cheers hope this helps.

gabriel.hege
May 18th, 2000, 05:18 AM
Hi!

I saw that you have already several solutions but here is an other one that might interest you:
DYN-DNS ( http://www.dyndns.org ) is a service, which routes your dynamic IP to a static DNS-name. You just have to create yourself an account and install a small program on your home computer. That program updates your IP at their database, each time you log on to your isp.
Then you can easily test if your home computer is online by pinging that DNS-name.

Regards,
Gabe

tritun
May 19th, 2000, 04:44 AM
Howdy!

this will require you to have IE installed on your machine

in VB add the Internet Transfer Control to you project.
drop the control on the form and use this

Private Sub Form_Load()
'the next line should be on ONE LINE!!!!!!!
html$ = Me.Inet1.OpenURL("http://wwp.icq.com/?icqnumber=12594475")


If InStr(1, html$, "online.gif", 1) <> 0 Then
MsgBox "ON LINE!"
Else
MsgBox "OFF LINE!"
End If
End
End Sub

the source for the page has a refrence to online.gif when
the user is on line. if you are not them most likely it will
not have the online refrence.

I tried it with your account and a non-existing account and
a offline account. yours was the only one ON LINE!

hope this helps

campbell
May 23rd, 2000, 06:57 AM
I am sure you have email most email clients have filters now a days and its alot more simple to setup a filter then code a program to port through a 3rd party program to get a result. ex. Outlook Express 5 Setup a filter to automatically reply to a msg either from a specific email address or subject. When you send the email with this special email address ot the specific subject the OE will auto reply just make a plank msg and read the header coming back to you which will have you IP address.

da_silvy
May 26th, 2000, 12:46 PM
i believe icq 2000 has the ability to penetrate a firewall

vbsquare
May 30th, 2000, 06:37 AM
You can actually get ICQ98 through a firewall. It's just kinda tricky...
If anyone wants to know how using Deerfield's Wingate product email me - it took me a lot of hours to get it working.

ycsim
Jun 8th, 2000, 04:31 PM
if you want to use icq, there is a working version of web icq
it is compatible with icq
you can see yourself or your contacts online with this version of icq

go to http://come.to/webicq

i use this to access icq in school...hehe:)