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.
//I don't know which class and which version you use.
//To ensure that you're not running into incompatibility issues, I decided to includes this base class
class Bitcoin
{
public $id = 0;
public $host = "127.0.0.1";
public $port = 8332;
public $user = "" ; //Insert RPC username here
public $pass = "" ; //Insert RPC password here
public function __call($func, $param)
{
$data = json_encode(
array(
'id'=>$this->id++,
'method'=>$func,
'params'=>$param
)
);
$ch = curl_init("http://".$this->host.":".$this->port."");
if ($ch)
{
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, rawurlencode($this->user).":".rawurlencode($this->pass));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$out = curl_exec($ch);
$error = curl_error($ch);
curl_close($ch);
if ($error)
{
throw new Exception($error);
}
$decoded = json_decode($out);
if ($decoded === null)
{
throw new Exception("Malformed JSON: $out");
}
return $decoded;
}
else
{
throw new Exception(curl_error($ch));
}
}
}
$bitcoin = new Bitcoin();
$count = 2;
$offset = 0;
//Here's the actual code which groups the transaction
header("Content-Type: text/html; charset=UTF-8");
echo "";
echo "Transactions
";
while (true)
{
//First parameter: Account, * = all
//Second parameter: Max count
//Third parameter: Offset
$result = $bitcoin->listtransactions('*', $count, $offset);
if (!$result->result) break;
echo "Tranaction at offset
$offset, max count $count";
echo ""
.htmlspecialchars(print_r($result, true))."
";