19 blocks wasn't a bad effort for a first test run.
It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
#!/usr/bin/ruby
require 'net/http'
require 'date'
current_hash_rate = 0.00
max_hash_rate = 0.00
loop do
begin
url = URI.parse('https://www.btcguild.com//halloffame.php')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url.path)
response = http.start {|http| http.request(request)}
case response
when Net::HTTPSuccess then source = response.body
else
puts "Error in HTTP connection"
next
end
match_string = '67117 ' '
source = source[(source.index(match_string) + match_string.length)..-1]
match_string = ' GH/s
source = source[0...(source.index(match_string))]
source.gsub! ',', ''
hash_rate = source.to_f
if hash_rate != current_hash_rate
max_hash_rate = [max_hash_rate, hash_rate].max
current_hash_rate = hash_rate
puts "#{DateTime.now}:\t current #{"%.2f" % current_hash_rate}\t max #{"%.2f" % max_hash_rate}"
end
sleep 10.0
rescue
next
end
end
#!/usr/bin/ruby
require 'net/http'
require 'date'
current_hash_rate = 0.00
max_hash_rate = 0.00
loop do
begin
url = URI.parse('https://www.btcguild.com//halloffame.php')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url.path)
response = http.start {|http| http.request(request)}
case response
when Net::HTTPSuccess then source = response.body
else
puts "Error in HTTP connection"
next
end
match_string = '67117 ' '
source = source[(source.index(match_string) + match_string.length)..-1]
match_string = ' GH/s
source = source[0...(source.index(match_string))]
source.gsub! ',', ''
hash_rate = source.to_f
if hash_rate != current_hash_rate
max_hash_rate = [max_hash_rate, hash_rate].max
current_hash_rate = hash_rate
puts "#{DateTime.now}:\t current #{"%.2f" % current_hash_rate}\t max #{"%.2f" % max_hash_rate}"
end
sleep 10.0
rescue
next
end
end