Repository
https://github.com/nawab69/steemtools
What Will I Learn?
- You will learn About steem account recovery
- You will learn How to make PHP web tool
- You will learn How to make a PHP site which will change current recovery account
- You will learn How to use API
Requirements
- Knowledge on PHP, HTML, Bootstrap, API
- Php server
- Bootstrap CDN
- SteemConnect
Difficulty
- Intermediate
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 -
- Steemstats - Steemtools
- Check Withdraw Routes
- Change Withdraw Vesting Routes
- Withdraw Vesting Route Remove
- mcBOT - Mr. Counter bot
- Check current recovery account
Now I will teach you creating steemit account recovery tools. This tool has five part.
- Check current recovery account ✅
- Change recovery Account ⭕
- Check recovery Request
- Request account Recovery
- Recover Account
Yesterday I have taught you the first part. Today, I will teach you the second part.
Change Recovery Account
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 header file :
include()
is a PHP function. TheInclude()
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-
- Your steemit username.
- New recovery account username.
So, create a bootstrap form with two 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="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-
- Get data from HTML form using the POST method. Then store them in different variables.
<?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.
- Generate steemconnect URL :
For changing recovery account steemconnect need 3 input. These are -
- account_to_recover: Your steem username.
- new_recovery_account : New recovery account username.
- extensions: I don't know what is it. But its default value is
[]
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
- Redirect to steemconnect: Finally, you have to redirect to steemconnect URL for confirming the transaction.
header("Location: $api"); // redirect to steemconnect
}
?>
Include footer : Include your footer file
<?php
include ('include/footer.php');
//include footer
?>
Download The file from github
Test the tool
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.
Curriculum
- Steemstats - Steemtools
- Check Withdraw Routes
- Change Withdraw Vesting Routes
- Withdraw Vesting Route Remove
- mcBOT - Mr. Counter bot
- Check current recovery account
Proof Of work done
https://github.com/nawab69/steemtools
https://steemtools.cf/changerecovery