Frustrated by this, I have been trying to make an updated pretty version of block_crawler with the added beauty of "search by address"
I can see where to add code in block_explorer.php
echo " <div class=\"menu_item\">\n";
echo " <span class=\"menu_desc\">Enter a Block Index / Height</span><br>\n";
echo " <form action=\"".$_SERVER["PHP_SELF"]."\" method=\"post\">\n";
echo " <input type=\"text\" name=\"block_height\" size=\"40\">\n";
echo " <input type=\"submit\" name=\"submit\" value=\"Jump To Block\">\n";
echo " </form>\n";
echo " </div>\n";
echo "\n";
echo " <div class=\"menu_item\">\n";
echo " <span class=\"menu_desc\">Enter A Block Hash</span><br>\n";
echo " <form action=\"".$_SERVER["PHP_SELF"]."\" method=\"post\">\n";
echo " <input type=\"text\" name=\"block_hash\" size=\"40\">\n";
echo " <input type=\"submit\" name=\"submit\" value=\"Jump To Block\">\n";
echo " </form>\n";
echo " </div>\n";
echo "\n";
echo " <div class=\"menu_item\">\n";
echo " <span class=\"menu_desc\">Enter A Transaction ID</span><br>\n";
echo " <form action=\"".$_SERVER["PHP_SELF"]."\" method=\"post\">\n";
echo " <input type=\"text\" name=\"transaction\" size=\"40\">\n";
echo " <input type=\"submit\" name=\"submit\" value=\"Jump To TX\">\n";
echo " </form>\n";
echo " </div>\n";
echo "\n";
echo " </div>\n";
echo "\n";
}It seems simply copy paste one of the 3 above, and alter it to a different rpc call (the rpc call does not work but visually it appears as if you could search by address).
echo "\n";
echo " <div class=\"menu_item\">\n";
echo " <span class=\"menu_desc\">Enter A Transaction ID Enter an Address</span><br>\n";
echo " <form action=\"".$_SERVER["PHP_SELF"]."\" method=\"post\">\n";
echo " <input type=\"text\" name=\"transaction\" size=\"40\">\n";
echo " <input type=\"submit\" name=\"submit\" value=\"Jump To TX\">\n";
echo " </form>\n";
echo " </div>\n";Then of course remove the ban in bc_api.php, either or both of these I guess
//////////////////////////////////////////////////////////////////////////////////////////////////
// These are security checks to ensure that no one uses the API
// to request balance data or mess up the wallet.
if ($request[0] == "getbalance")
{
bcapi_error (1, "Method Not Permitted: getbalance");
}
if ($request[0] == "listaccounts")
{
bcapi_error (2, "Method Not Permitted: listaccounts");
}
if ($request[0] == "listtransactions")
{
bcapi_error (3, "Method Not Permitted: listtransactions");
}
/////////////////////////////////////////////////////////////////////////////////////////////////
Then I am left with making right call on my new add-on in block_crawler.php
echo "\n";
echo " <div class=\"menu_item\">\n";
echo " <span class=\"menu_desc\">Enter A Transaction ID Enter an Address</span><br>\n";
echo " <form action=\"".$_SERVER["PHP_SELF"]."\" method=\"post\">\n";
echo " <input type=\"text\" name=\"transaction\" size=\"40\">\n";
echo " <input type=\"submit\" name=\"submit\" value=\"Jump To TX\">\n";
echo " </form>\n";
echo " </div>\n";I guessed there would be a "getbalance" or "lisittransactions" in there but php is not my forte.
Then I thought maybe I needed a GET or just a REQUEST or something in there.
To some people this is easy, and I have scoured the web.
Anyone know where I am wrong?
Visually it is not tricky to make the old crawler look a bit nicer.
https://github.com/CallMeJake/BlockCrawler