Announcement

Collapse
No announcement yet.

Speed Pingtests

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Speed Pingtests

    Some clever Liberty Basic programmer provided the following code to run speed pingtests on the BBC site as below. I can assure you all you can safely run it or save a copy at

    http://www.sigord.co.uk/MISCL/Pingtest.exe

    Since I am not prepared to risk leaving any router connected to the mains permanently, I find it useful to check if am online OK when I startup the PC.

    But how do I obtain the lpszURL$ for other sites please to include the option in the program please?



    [start]
    = "http://212.58.244.66" ' www.bbc.co.uk

    FLAG.ICC.FORCE.CONNECTION=1
    startTime=time$("ms")
    open "wininet.dll" for dll as #win
    calldll #win, "InternetCheckConnectionA",_
    lpszURL$ As ptr, _
    FLAG.ICC.FORCE.CONNECTION As Long,_
    dwReserved As Long, _
    result As ulong

    close #win
    endTime=time$("ms")
    elapsedTime=endTime-startTime
    if elapsedTime<0 then elapsedTime=elapsedTime+86400000 'midnight rollover

    If result=1 then
    print "Connected; ";elapsedTime;" ms using http://212.58.244.66 www.bbc.co.uk"
    else
    print "No connection"
    end if

    timer 2000, [go] : wait
    [go]timer 0 : goto [start]

  • #2
    Re: Speed Pingtests

    Just ping a site by name and you will see the IP address:

    C:\Users\administrator>ping www.microsoft.com

    Pinging lb1.www.ms.akadns.net [64.4.11.42] with 32 bytes of data:
    Request timed out.
    Request timed out.

    Ping statistics for 64.4.11.42:
    Packets: Sent = 2, Received = 0, Lost = 2 (100% loss),
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: Speed Pingtests

      Thanks but sorry to be a bit ' thick ' Ossian by inserting

      C:\Users\administrator>ping www.microsoft.com

      in IE or by using RUN fails to do anything. Which is not surprising since a list ALL files including those hidden such as by using

      http://www.turbonavigator.com/

      show that hers is no such folder as C:\Users in Windows XP

      Comment


      • #4
        Re: Speed Pingtests

        Sorry, to clarify further
        1) Open a command prompt
        2) Type "ping www.microsoft.com" (Note a) do not type the quotes (b) other sites are available
        3) note the IP address returned e.g. 64.4.11.42
        4) put that IP address in the script you originally posted in the second line (just under [start]
        5) Save the script
        6) run the script
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment


        • #5
          Re: Speed Pingtests

          Thanks Ossian

          I will compile a list of sites as options to ping test

          Comment


          • #6
            Re: Speed Pingtests

            Just to add that many networks block icmp messages so icmp isn't always a good sign of reachability.
            CCNA, CCNA-Security, CCNP
            CCIE Security (In Progress)

            Comment


            • #7
              Re: Speed Pingtests

              Which router do you have? I'm interested why you don't want to leave it connected.
              cheers
              Andy

              Please read this before you post:


              Quis custodiet ipsos custodes?

              Comment

              Working...
              X