https://github.com/nawab69/steemtools
Hello Steemians,
I am Nawab. Last week an accident happened to me. So I didn't write any tutorial one week. Now I want to continue my steemtools php tutorial series. In this ongoing series, I have taught you to make some useful tools based on steemit in php language.
Here is the previous series -
Now I will teach you creating steemit account recovery tools. This tool has five part.
It is a tool which can change your recovery account using steemconnect. Follow the steps to make change recovery account…
First, create a file changerecovery.php in the home directory. Then write down the below codes.
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 changing steem recovery account with steemconnect, You must input 2 data. These are-
<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="user" 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="to" placeholder="Recovery Account">
</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)
{
$from = $_POST["user"]; // username
$to = $_POST["to"]; // recovery account
Here if($_POST){} means when someone post using HTML form, all the functions inside {} will run.
[]Write this code to make a steemconnect URL
$ext = "[]"; // extension
$api = "https://app.steemconnect.com/sign/change_recovery_account?account_to_recover=$from&new_recovery_account=$to&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
Open the file using a browser. You will see this.
Now input your username and new recovery account. Then click on submit.
The browser will redirect to steemconnect. Input your username & password. Then confirm.
https://github.com/nawab69/steemtools
https://steemtools.cf/changerecovery