https://github.com/nawab69/steemtools
Hello Steemians,
I am Nawab. I have started steemtools series again last week after a long break . In this ongoing series, I have taught you to make some useful tools based on steemit in php language.
I am sorry for my grammatical errors. I am trying to improve my previous fault.
Here is the previous series -
Now I will teach you creating steemit account recovery tools. This tool has five part.
Two days ago, I have taught you the 2nd part. Today, I will teach you the third part.
It is a tool which can request your recovery account for recover your account using steemconnect. Follow the steps to make request account recovery…
First, create a file requestrecovery.php in the home directory. Then write down the below codes. It is simmilar like changerecovery.php tool.
include() is a PHP function. The Include() function is used to put data of one PHP file into another PHP file. If errors occur then the include() function produces a warning but does not stop the execution of the script i.e. the script will continue to execute.The header file is not so important. So use this function.
<?php
include ('include/header.php'); // Include header file
include ('include/nav.php'); //Include navigation bar file
?>
Username and recovery account input form:
For request account recovery with steemconnect, You must input 4 data. These are-
[] . So skip it in form.)Create a bootstrap form with three input box and a submit button.
<form action="" method="post" >
<div class="form-group">
<div class="input-group mb-2 mr-sm-2">
<div class="input-group-prepend">
<div class="input-group-text">@</div>
</div>
<input type="text" class="form-control" name="username" placeholder="username"> </div> </div>
<div class="form-group">
<div class="input-group mb-2 mr-sm-2">
<div class="input-group-prepend"> <div class="input-group-text">@</div> </div>
<input type="text" class="form-control" name="recovery" placeholder="Recovery Account username"> </div> </div>
<div class="form-group">
<div class="input-group mb-2 mr-sm-2">
<div class="input-group-prepend"> <div class="input-group-text">@</div> </div>
<input type="text" class="form-control" name="new" placeholder="New owner authority's username"> </div> </div>
<div class="form-group">
<button align="center" name="submit" class="btn btn-primary mb-2">Submit</button>
</div>
</form>
Php functions :Now you have to write some php functions to run the tool. These are-
<?php
if($_POST)
{
$recovery = $_POST["recovery"]; // recovery account username
$username = $_POST["username"]; // account to recover username
$new = $_POST["new"]; // new owner authority
Here if($_POST){} means when someone post using HTML form, all the functions inside {} will run.
[]Write this code to generate a steemconnect URL
$ext = "[]"; // extension
$api = "https://app.steemconnect.com/sign/request_account_recovery?recovery_account=$recovery&account_to_recover=$username&new_owner_authority=$new&extensions=$ext"; // steemconnect Api
header("Location: $api"); // redirect to steemconnect
}
?>
Include footer : Include your footer file
<?php
include ('include/footer.php');
//include footer
?>
Download The file from github
First, open your tool using any browser. Then you will see 3 input box.
Input your username in first box. Then input your recovery account username in the second box. Then input new account authority in the last box.
The tool will redirect to steemconnect and show all values. Then click on "continue".
Finally input your username and wif and login.
https://github.com/nawab69/steemtools
https://steemtools.cf/requestrecovery