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.
curl -u myusername:mypassword --data-binary @json.txt -H 'content-type: application/json-rpc;' "http://192.168.1.10:8332/"
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}
curl -u myusername:mypassword --data-binary -d json.txt -H 'content-type: text/plain;' "http://192.168.1.10:8332/"
{"jsonrpc": "1.0", "id": "curltest", "method": "getwork", "params": [] }
curl: (6) Could not resolve host: text; No data record of requested type
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}
C:\curl\bin>curl -u myusernamewashere:mypasswordwashere --data-binary '{"jsonrpc": "1
.0", "id":"curltest", "method": "getwork", "params": [] }' -H 'content-type: tex
t/plain;' "http://192.168.1.10:8332/"
curl: (6) Could not resolve host: 1.0,; No data record of requested type
curl: (6) Could not resolve host: id; No data record of requested type
curl: (6) Could not resolve host: method; No data record of requested type
curl: (6) Could not resolve host: getwork,; No data record of requested type
curl: (6) Could not resolve host: params; No data record of requested type
curl: (3) [globbing] illegal character in range specification at pos 2
curl: (3) [globbing] unmatched close brace/bracket at pos 1
curl: (6) Could not resolve host: text; No data record of requested type
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}
public function sendmany($addressarr, $amountarr, $comment = NULL, $comment_to = NULL) {
if (!$addressarr || empty($addressarr))
throw new BitcoinClientException("sendmany requires a destination address");
if (!$amountarr || empty($amountarr))
throw new BitcoinClientException("sendmany requires an amount to send");
//if (!is_numeric($amountarr) || $amountarr <= 0)
// throw new BitcoinClientException("sendmany requires the amount sent to be a number > 0");
//$amountarr = floatval($amountarr);
if (!$comment && !$comment_to)
return $this->query("sendmany", $addressarr, $amountarr);
if (!$comment_to)
return $this->query("sendmany", $addressarr, $amountarr, $comment);
return $this->query("sendmany", $addressarr, $amountarr, $comment, $comment_to);
}
public function query($message) {
if (!$message || empty($message))
throw new BitcoinClientException("Bitcoin client query requires a message");
$msg = new jsonrpcmsg($message);
if (func_num_args() > 1) {
for ($i = 1; $i < func_num_args(); $i++) {
$msg->addParam(self::query_arg_to_parameter(func_get_arg($i)));
}
}
$response = $this->send($msg);
if ($response->faultCode()) {
throw new BitcoinClientException($response->faultString());
}
return php_xmlrpc_decode($response->value());
}
public function query_arg_to_parameter($argument) {
$type = "";// "string" is encoded as this default type value in xmlrpc.inc
if (is_numeric($argument)) {
if (intval($argument) != floatval($argument)) {
$argument = floatval($argument);
$type = "double";
} else {
$argument = intval($argument);
$type = "int";
}
}
if (is_bool($argument))
$type = "boolean";
if (is_int($argument))
$type = "int";
if (is_float($argument))
$type = "double";
if (is_array($argument))
$type = "array";
return new jsonrpcval($argument, $type);
}
00715 public function sendtoaddress($address, $amount, $comment = NULL, $comment_to = NULL) {
00716 if (!$address || empty($address))
00717 throw new BitcoinClientException("sendtoaddress requires a destination address");
00718 if (!$amount || empty($amount))
00719 throw new BitcoinClientException("sendtoaddress requires an amount to send");
00720 if (!is_numeric($amount) || $amount <= 0)
00721 throw new BitcoinClientException("sendtoaddress requires the amount sent to be a number > 0");
00722 $amount = floatval($amount);
00723 if (!$comment && !$comment_to)
00724 return $this->query("sendtoaddress", $address, $amount);
00725 if (!$comment_to)
00726 return $this->query("sendtoaddress", $address, $amount, $comment);
00727 return $this->query("sendtoaddress", $address, $amount, $comment, $comment_to);
00728 }