Results 1 to 16 of 16

Thread: Detect if another computer is online

  1. #1

    Thread Starter
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375
    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,
    Morgan
    [email protected] - Home
    [email protected] - Work
    Using VB6 SP6 but trying to learn VB2005EE

  2. #2
    Guest
    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

  3. #3

    Thread Starter
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375
    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...
    Morgan
    [email protected] - Home
    [email protected] - Work
    Using VB6 SP6 but trying to learn VB2005EE

  4. #4
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    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.


    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  5. #5
    Hyperactive Member razzaj's Avatar
    Join Date
    Oct 1999
    Location
    jounieh
    Posts
    261
    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]
    - regards -
    - razzaj -

  6. #6
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    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.

    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  7. #7
    Lively Member
    Join Date
    Aug 1999
    Posts
    89
    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.

  8. #8
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    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??
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  9. #9
    New Member
    Join Date
    May 2000
    Posts
    1

    Cool Using VB to check for a Computer online

    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
    ([email protected])

  10. #10
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    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.

  11. #11
    New Member
    Join Date
    Nov 1999
    Posts
    3

    Talking

    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

  12. #12
    New Member
    Join Date
    May 2000
    Location
    Mesquite, Texas
    Posts
    1

    Talking Try this

    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




  13. #13
    New Member
    Join Date
    May 2000
    Location
    LA County California
    Posts
    4

    Exclamation

    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.

  14. #14
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    i believe icq 2000 has the ability to penetrate a firewall

  15. #15
    Addicted Member
    Join Date
    Jan 1999
    Posts
    173
    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.
    "To the glory of God!"


  16. #16
    Lively Member
    Join Date
    May 1999
    Location
    Singapore
    Posts
    116
    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
    YC Sim
    Teenage Programmer
    UIN 37903254



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width