Implementation getBlock() function to index.php