/ Published in: Ruby
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# encoding = utf-8 require 'net/ping' Net::Ping::HTTP.new('http://example.com') do |http| http.ping ? puts('ok!') : puts(http.exception) end