Author

Topic: CallmeJake BlockCrawler removing Network H/s (Read 1760 times)

hero member
Activity: 644
Merit: 500
September 15, 2014, 11:20:06 AM
#5
We second what Willisius says; but rather than cut we just // those lines out.

I was trying with the // but I must have always gone too far, or missed one out. :-)
hero member
Activity: 644
Merit: 500
September 15, 2014, 11:18:53 AM
#4
Thank you, Willisius, you are right.

I really appreciate your help.
full member
Activity: 218
Merit: 115
September 11, 2014, 10:49:49 PM
#3
We second what Willisius says; but rather than cut we just // those lines out.
sr. member
Activity: 364
Merit: 250
I'm really quite sane!
September 11, 2014, 08:35:11 PM
#2
Can't you just do this? (Look for the long strings of asterisks)

Code:

require_once (
"bc_daemon.php");
require_once ("bc_layout.php");


// If a block hash was provided the block detail is shown
if (isset ($_REQUEST["block_hash"]))
{
site_header ("Block Detail Page");

block_detail ($_REQUEST["block_hash"], TRUE);
}

// If a block height is provided the block detail is shown
elseif (isset ($_REQUEST["block_height"]))
{
site_header ("Block Detail Page");

block_detail ($_REQUEST["block_height"]);
}

// If a TXid was provided the TX Detail is shown
elseif (isset ($_REQUEST["transaction"]))
{
site_header ("Transaction Detail Page");

tx_detail ($_REQUEST["transaction"]);
}

// If there were no request parameters the menu is shown
else
{
site_header ("Block Crawler Home Page");

echo " \n";
echo "\n";

$network_info getinfo ();

echo " \n";
echo " Block Count:
\n"
;
echo " ".$network_info["blocks"]."\n";
echo "
\n";
echo "\n";

echo " \n";
echo " Difficulty:
\n";
echo " ".$network_info["difficulty"]."\n";
echo "
\n";
echo "\n";

echo " \n";
echo " Connections:
\n";
echo " ".$network_info["connections"]."\n";
echo "
\n";
echo "\n";
                
//******************************************************************/
                //Cut below here
                //******************************************************************/
[b]$net_speed getnetworkhashps ();[/b]

if ($net_speed != "")
{
echo " \n";
echo " Network H/s:
\n";
echo " ".$net_speed."\n";
echo "
\n";
echo "\n";
}
//******************************************************************/
                //Cut above here
                //******************************************************************/
echo "
\n";
echo "\n";

echo " \n";
echo "\n";

echo " \n";
echo " Enter a Block Index / Height
\n";
echo " .$_SERVER["PHP_SELF"]."\" method=\"post\">\n";
echo " \n";
echo " \n";
echo " \n";
echo "
\n";
echo "\n";

echo " \n";
echo " Enter A Block Hash
\n";
echo " .$_SERVER["PHP_SELF"]."\" method=\"post\">\n";
echo " \n";
echo " \n";
echo " \n";
echo "
\n";
echo "\n";

echo " \n";
echo " Enter A Transaction ID
\n";
echo " .$_SERVER["PHP_SELF"]."\" method=\"post\">\n";
echo " \n";
echo " \n";
echo " \n";
echo "
\n";
echo "\n";

echo "
\n";
echo "\n";
}


site_footer ();
hero member
Activity: 644
Merit: 500
September 11, 2014, 05:49:32 PM
#1
I would appreciate a response to this. does anyone know how to remove the function getnetworkhashps?

Basically, so it does not appear on the Crawler.

I've tried doing it, but I seem to slice off the right hand side of the Crawler, so get no information.

The reason I am asking is I do not have that function as an rpc call, so it just shows up as "error", which looks pretty stupid.

Sorry to post the whole file, but if anyone answers, it might be that they spot it right away without ever having used the BC


____________



   require_once ("bc_daemon.php");
   require_once ("bc_layout.php");
   
   
//   If a block hash was provided the block detail is shown
   if (isset ($_REQUEST["block_hash"]))
   {
      site_header ("Block Detail Page");
      
      block_detail ($_REQUEST["block_hash"], TRUE);
   }
   
//   If a block height is provided the block detail is shown
   elseif (isset ($_REQUEST["block_height"]))
   {
      site_header ("Block Detail Page");
      
      block_detail ($_REQUEST["block_height"]);
   }
   
//   If a TXid was provided the TX Detail is shown
   elseif (isset ($_REQUEST["transaction"]))
   {
      site_header ("Transaction Detail Page");
      
      tx_detail ($_REQUEST["transaction"]);
   }
   
//   If there were no request parameters the menu is shown
   else
   {
      site_header ("Block Crawler Home Page");
      
      echo "   
\n";
      echo "\n";
      
      $network_info = getinfo ();
      
      echo "      
\n";
      echo "         Block Count:
\n";
      echo "         ".$network_info["blocks"]."\n";
      echo "      
\n";
      echo "\n";

      echo "      
\n";
      echo "         Difficulty:
\n";
      echo "         ".$network_info["difficulty"]."\n";
      echo "      
\n";
      echo "\n";

      echo "      
\n";
      echo "         Connections:
\n";
      echo "         ".$network_info["connections"]."\n";
      echo "      
\n";
      echo "\n";

      $net_speed = getnetworkhashps ();
      
      if ($net_speed != "")
      {
         echo "      
\n";
         echo "         Network H/s:
\n";
         echo "         ".$net_speed."\n";
         echo "      
\n";
         echo "\n";
      }
      
      echo "   
\n";
      echo "\n";

      echo "   
\n";
      echo "\n";
      
      echo "      
\n";
      echo "         Enter a Block Index / Height
\n";
      echo "         
\n";
      echo "            \n";
      echo "            \n";
      echo "         
\n";
      echo "      
\n";
      echo "\n";

      echo "      
\n";
      echo "         Enter A Block Hash
\n";
      echo "         
\n";
      echo "            \n";
      echo "            \n";
      echo "         
\n";
      echo "      
\n";
      echo "\n";

      echo "      
\n";
      echo "         Enter A Transaction ID
\n";
      echo "         
\n";
      echo "            \n";
      echo "               \n";
      echo "         
\n";
      echo "      
\n";
      echo "\n";

      echo "   
\n";
      echo "\n";
   }
   
   
   site_footer ();
Jump to: