I shall have a look into it later, much appreciated,
Matt!
glad to see you are still at it
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/perl -w
# bet_verify.pl
use strict;
use warnings;
use Digest::SHA qw(hmac_sha512_hex);
use Math::Random::MT;
if(!$ARGV[0] || $ARGV[0] eq "--help" || $ARGV[0] eq "-h" || $ARGV[0] eq "/?")
{
print "usage: confirm_bet.pl \n";
exit;
}
my $range=$ARGV[0];
my $secret=$ARGV[1];
my $tx=$ARGV[2];
my $seed = Digest::SHA::hmac_sha512_hex($tx, $secret); # hash txid and secret
$seed =~ s/^(.{8}).*$/$1/; # use 1st 8 characters of hash for secret
$seed = hex($seed) + 0; # convert hex to number
my $gen = Math::Random::MT->new($seed); # seed MT
my $number = int($gen->rand($range)+1); # generate random result inside game range using seeded MT
print "Result: $number\n";
exit;
// Fire up a JSON client
$client = new jsonRPCClient($json_url);
// Get the transaction
$transactions=$client->listtransactions("account-name-of-account-user-deposited-into",1);
// Grab the block hash (can't be predicted by us or user) and transaction ID
$blockhash = $transactions[0]['blockhash'];
$txid = $transactions[0]['txid'];
// Hash the block hash with the transaction ID as a key
$hash = hash_hmac("sha512",$blockhash,$txid);
// Convert the first hex digit of the hash to an int
$diceRoll = hexdec(substr($hash,0,1));
$random= mt_rand(1,6); //Create a random number between 1 and 6.
$string = "TvG5hs3";
$output = hash('SHA256', $random); //Hashing the random number with SHA256
$salt = substr(str_replace('+', '.', base64_encode(pack('N4', mt_rand(), mt_rand(), mt_rand(), mt_rand()))), 0, 22);
echo $salt. $random. $string .$output; //Outputting the hash.