Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pinging Network Server
#3
Function IntPing2
Code:
Copy      Help
function# [$url]

;Attempts to connect to url.
;If successful, returns the time (ms) spent to connect. If cannot connect, returns 0.



long t1=perf
if(!inet.InternetCheckConnection(url inet.FLAG_ICC_FORCE_CONNECTION 0)) ret
long t2=perf
int i=t2-t1/1000
if(!i) i=1
ret i

Example
Code:
Copy      Help
out IntPing2("http://www.quickmacros.com")


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)