### Repository https://github.com/nawab69/steemtools ### What will you learn- - You will learn how to use SteemConnect - You will learn about Steemconnect - You will learn how to check withdraw routes - You will learn how to create a php application ### Requirements - Web Hosting - Text Editor - knowledge on php, JSON & html ### Difficulty - Intermediate ### Description Hello everybody, I am Nawab. A full stack web developer in opensource community. Currently I am working on a project. My project is teaching everybody about app development. I am not good in English Language. I am living in UK from five years. Please forgive me if I write any grammatical errors. In my previous tutorial you have learned how to check withdraw Routes using Php + SteemJs Today I will teach you 2nd part of these tutorial. If someone want to power down his steem power to another steemit account, he/she should use this system. This is not visible to steemit.com . You can use the system by SteemJS API & STEEMCONNECT. - You can check your current withdraw vesting route by SteemJS API - You can change your current withdraw vesting route by STEEMCONNECT API  #### Tutorial First create ``change.php`` file. Use any HTML & CSS template in your page to look better. I use basic bootstrap template. First, Include the header and the navigation bar template file. ``` <?php /* Include header file */ include ('include/header.php'); /* Include navigation bar file */ include ('include/nav.php'); ?> ``` If you want to change your withdraw route, you have to input 4 data. These are- - From Account - To Account - Percentage - Auto Vest So Create a Form with "post" methood. ``` <form action="" method="post" > </form> ``` Inside the form create 4 form input box. | Sn No | Input | Type | Name | |:-----:|--------------|--------|---------| | 1 | FROM ACCOUNT | text | user | | 2 | TO ACCOUNT | text | to | | 3 | PERCRNTAGE | range | percent | | 4 | AUTO VEST | select | auto | ##### FROM ACCOUNT This input box for input own username. Write down this code inside form tag. ``` <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" id="inlineFormInputGroupUsername2" placeholder="Username"> </div> </div> ``` ##### TO ACCOUNT This input box for input own username. Write down this code after "FROM ACCOUNT" input text box. ``` <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" id="inlineFormInputGroupUsername2" placeholder="Withdraw To"> </div> </div> ``` ##### PERCENTAGE It is a range input type. It use for changing percentage of withdraw route. Write down this code after "TO ACCOUNT" input box. ``` <label for="customRange3">Percentage </label> <input name="percent" type="range" class="custom-range" min="0" max="10000" step="500" id="customRange3"> ``` ##### AUTO VEST It is a select input type. It use for select any option from popup. I use here true & false option. Write down this code after "Percentage" Range input box. ``` <label class="my-1 mr-2" for="inlineFormCustomSelectPref">Auto Vest</label> <select name="auto" class="custom-select my-1 mr-sm-2" id="inlineFormCustomSelectPref"> <option selected>Choose...</option> <option value="true">True</option> <option value="false">False</option> </select> ``` Now the form building has completed. But it won't work. We need to create some php function to run this form. ##### Submit button #### Create Php function ``` <?php if($_POST) { $from = $_POST["user"]; // store username from Form using post method $to = $_POST["to"]; // store withdraw to username from Form using post method $percent = $_POST["percent"]; // store percentage from Form using post method $auto = $_POST["auto"]; // store auto vest boolean from Form using post method } ?> ``` Write this code after the form close tag. I used here "if" condition statement. If anyone post using the form, all the function inside the "{}" will run. I have created 4 variables, they will store input data from form. Now write the bellow code, ``` $api = "https://steemconnect.com/sign/set_withdraw_vesting_route?from_account=$from&to_account=$to&percent=$percent&auto_vest=$auto"; // steemconnect Api for changing withdraw routes header("Location: $api"); // redirect to steemconnect ``` Here we create a variable named "$api " and write the api. For changing Withdraw Route, STEEMCONNECT API is, ``https://steemconnect.com/sign/set_withdraw_vesting_route``. This API has four parameters. These are - - from_account - to_account - percent - auto_vest I have written their value in variables. When a user insert data in form and submit. These data will store in variables. These variables will use as different parameter's value. Finally redirect users to STEEMCONNECT by this line `` header("Location: $api"); `` Now insert footer and save the file. ### How to work First browse the file from server. This window will open.  Insert all data. For example, I use > username = @nawab69 withdraw to = @utopian-io percentage = max(10000) auto vest = false  Then press the submit button. Site will redirect to steemconnect. Check your input data. If its correct, press the submit button.  Steemconnect ask you username & password. Fill them and Sign in. The withdraw vesting routes will change.  Here is the full codes of my tutorial ``` <?php /* Include header file */ include ('include/header.php'); /* Include navigation bar file */ include ('include/nav.php'); ?> <div class="container"> <br> <br> <div class="card"> <h5 class="card-header">Add / change Withdraw Vesting Route</h5> <div class="card-body"> <center> <!-- Form start Here --> <form action="" method="post" > <!-- Username Input box --> <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" id="inlineFormInputGroupUsername2" placeholder="Username"> </div> </div> <!-- Withdraw To input box --> <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" id="inlineFormInputGroupUsername2" placeholder="Withdraw To"> </div> </div> <!-- Parcentage Range Input box --> <label for="customRange3">Percentage </label> <input name="percent" type="range" class="custom-range" min="0" max="10000" step="500" id="customRange3"> <!-- Auto Vesting Withdraw select box --> <label class="my-1 mr-2" for="inlineFormCustomSelectPref">Auto Vest</label> <select name="auto" class="custom-select my-1 mr-sm-2" id="inlineFormCustomSelectPref"> <option selected>Choose...</option> <option value="true">True</option> <option value="false">False</option> </select> <br> <!-- Submit Button --> ``` <div class="form-group"> <button align="center" name="submit" class="btn btn-primary mb-2">Submit</button> </div> ``` <div class="form-group"> <button align="center" name="submit" class="btn btn-primary mb-2">Submit</button> </div> </form> <!-- End form --> </div> </center></div> <!-- Php function start Here --> <?php if($_POST) { $from = $_POST["user"]; // store username from Form using post method $to = $_POST["to"]; // store withdraw to username from Form using post method $percent = $_POST["percent"]; // store percentage from Form using post method $auto = $_POST["auto"]; // store auto vest boolian from Form using post method $api = "https://steemconnect.com/sign/set_withdraw_vesting_route?from_account=$from&to_account=$to&percent=$percent&auto_vest=$auto"; // steemconnect Api for changing withdraw routes header("Location: $api"); // redirect to steemconnect } ?> </div> <nav class="navbar fixed-bottom navbar-dark bg-dark"> <p align="center" style="color:#fff;"> This tools created by <b>@nawab69 </b></p> </nav> <?php include ('include/footer.php'); ?> ``` ### Curriculum [[ Php + SteemJs Api ] Steembased Web Application Building Tutorial - Part-1 (steem stats)](https://steemit.com/utopian-io/@nawab69/php-steemjs-api-steembased-web-application-building-tutorial-part-1-steem-stats) [[Php + SteemJs API] Withdraw Routes Check Application building Tutorial - Part-2](https://steemit.com/utopian-io/@nawab69/steemjs-api-php-build-a-php-application-for-showing-withdraw-routes-part2-2xlbelgp) ### Prove of work done https://github.com/nawab69/steemtools/blob/master/change.php http://steemtools.html-5.me/change.php Posted using [Partiko Android](https://steemit.com/@partiko-android)
author | nawab69 |
---|---|
permlink | steemconnect-php-withdraw-vesting-routes-changing-system-build-by-php-steemconnect-part-3-nb1tlbp7 |
category | utopian-io |
json_metadata | {"tags":["utopian-io","tutorials","development","steemit","partiko"],"image":["https://d1vof77qrk4l5q.cloudfront.net/img/674faad008fc5944ac0910f87b982ea69626aff4.jpg"],"app":"partiko"} |
created | 2019-01-26 16:22:45 |
last_update | 2019-01-26 16:22:45 |
depth | 0 |
children | 5 |
last_payout | 2019-02-02 16:22:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 8.185 HBD |
curator_payout_value | 2.648 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 9,615 |
author_reputation | 6,544,308,216,591 |
root_title | "[Steemconnect + Php] Withdraw Vesting Routes Changing System build by PHP & STEEMCONNECT - part 3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 78,972,143 |
net_rshares | 21,914,815,146,547 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tombstone | 0 | 1,441,294,224,095 | 6.38% | ||
cmtzco | 0 | 61,358,908 | 1.46% | ||
desmonid | 0 | 167,376,860 | 1.46% | ||
cryptohustlin | 0 | 1,069,819,250 | 1.46% | ||
chako5555 | 0 | 83,003,065 | 93.5% | ||
jasen.g1311 | 0 | 90,445,881 | 93.5% | ||
reported | 0 | 102,432,936 | 38.5% | ||
btctoken | 0 | 79,071,735 | 93.5% | ||
bofadeez | 0 | 15,277,366 | 1.46% | ||
bitcoindon23 | 0 | 113,777,582 | 38.5% | ||
rufans | 0 | 10,230,972,571 | 100% | ||
cnmtz | 0 | 71,085,868 | 38.5% | ||
eileenbeach | 0 | 409,504,597 | 1.46% | ||
steemitboard | 0 | 14,503,078,727 | 1% | ||
jga | 0 | 914,020,286 | 7.98% | ||
mrainp420 | 0 | 108,705,929 | 38.5% | ||
hookersandblow | 0 | 81,124,431 | 93.5% | ||
martinshkreli | 0 | 91,056,743 | 93.5% | ||
magikos | 0 | 89,945,549 | 93.5% | ||
minnowpond | 0 | 7,596,114,957 | 1.46% | ||
codingdefined | 0 | 23,363,428,829 | 20% | ||
minnowpond1 | 0 | 48,149,227 | 1.46% | ||
bachuslib | 0 | 20,116,318,546 | 100% | ||
leir | 0 | 1,962,291,463 | 50% | ||
jadabug | 0 | 1,178,916,462 | 1% | ||
thewindowflower | 0 | 207,557,015 | 38.5% | ||
mcfarhat | 0 | 11,371,746,383 | 6.6% | ||
umerjaved | 0 | 79,378,899 | 93.5% | ||
utopian-io | 0 | 19,439,328,204,095 | 15.96% | ||
jaff8 | 0 | 26,384,287,767 | 16.5% | ||
ering | 0 | 161,170,068 | 1.46% | ||
harmonicliving | 0 | 333,835,079 | 1.46% | ||
sammyb | 0 | 446,724,260 | 1.46% | ||
iloveghee | 0 | 84,979,356 | 93.5% | ||
johndc13 | 0 | 70,168,342 | 38.5% | ||
medha | 0 | 52,042,705 | 38.5% | ||
tugboatjoe89 | 0 | 89,069,675 | 93.5% | ||
sxlingsxlang | 0 | 83,296,238 | 93.5% | ||
bierbeach | 0 | 82,823,351 | 93.5% | ||
thebrightness | 0 | 83,916,504 | 93.5% | ||
schulbz | 0 | 78,953,209 | 1.46% | ||
woodrow | 0 | 0 | 1.46% | ||
amosbastian | 0 | 40,515,998,049 | 16.5% | ||
asaj | 0 | 18,204,351,444 | 100% | ||
po27 | 0 | 79,138,613 | 38.5% | ||
thevark | 0 | 269,987,254 | 1.46% | ||
drdeepdick | 0 | 0 | 1.46% | ||
ozioziozio | 0 | 88,368,609 | 93.5% | ||
shamrock017 | 0 | 0 | 1.46% | ||
rngdz | 0 | 143,384,427 | 38.5% | ||
aurore | 0 | 79,645,493 | 93.5% | ||
fosterswisdom | 0 | 85,734,744 | 93.5% | ||
ceotechnician | 0 | 83,193,732 | 93.5% | ||
biancawhite | 0 | 82,752,421 | 93.5% | ||
mindcombustion | 0 | 83,352,186 | 93.5% | ||
peacewarriorette | 0 | 83,235,659 | 93.5% | ||
blockchaindaily | 0 | 772,781,127 | 1.46% | ||
bojacktenenbaum | 0 | 82,767,706 | 93.5% | ||
paredros | 0 | 79,252,880 | 93.5% | ||
simplymike | 0 | 63,825,938,826 | 30% | ||
pazulang | 0 | 79,560,590 | 93.5% | ||
steemitla | 0 | 52,337,917 | 38.5% | ||
ezravandi | 0 | 436,227,687 | 1% | ||
andrecarothers | 0 | 2,867,337,704 | 1.46% | ||
codon | 0 | 77,752,534 | 93.5% | ||
masonbeck | 0 | 79,386,150 | 93.5% | ||
tovaceline | 0 | 82,619,391 | 93.5% | ||
zip512 | 0 | 38,659,321 | 1.46% | ||
mightypanda | 0 | 58,187,586,775 | 30% | ||
wowmiko | 0 | 80,080,585 | 38.5% | ||
voter000 | 0 | 2,991,615,534 | 1.46% | ||
bullinachinashop | 0 | 3,854,254,403 | 100% | ||
u25b2x | 0 | 0 | 1.46% | ||
papertradez | 0 | 57,134,744 | 1.46% | ||
steem-ua | 0 | 670,710,888,345 | 6% | ||
devsup | 0 | 2,773,685,442 | 0.69% | ||
votes4minnows | 0 | 648,246,803 | 5% | ||
bluesniper | 0 | 32,503,079,910 | 2.64% | ||
primeradue | 0 | 10,209,150,832 | 15% | ||
ascorphat | 0 | 1,746,003,901 | 2.5% |
Thank you for your contribution @nawab69. After analyzing your tutorial we suggest the following points listed below: - Nice work on the explanations of your code, although adding a bit more comments to the code can be helpful as well. - In your code there are blank lines, which makes it harder to read the code.  - Before publishing your tutorial check if everything was correct, in your contribution there is an image that was left to load due to the source of the image being wrong:  - Nice work on the explanations of your code, although adding a bit more comments to the code can be helpful as well. - Indent your code. <a href="https://en.wikipedia.org/wiki/Indentation_style">Link</a> - Improve the structure of your tutorial. Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category. To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/8/3-2-3-1-3-2-3-3-). ---- Need help? Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://join.utopian.io/)
author | portugalcoin |
---|---|
permlink | re-nawab69-steemconnect-php-withdraw-vesting-routes-changing-system-build-by-php-steemconnect-part-3-nb1tlbp7-20190126t170813126z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"users":["nawab69"],"image":["https://cdn.steemitimages.com/DQmTYpwULCXvyLDA72hc8r3fUdmvBoD4xEVnCumLcEQsjVk/1.png","https://cdn.steemitimages.com/DQmdN2ukbMbVwzXpmxf25yZwrhsTSCbMmM41QyrCCzBwXtq/2.png"],"links":["https://en.wikipedia.org/wiki/Indentation_style","https://join.utopian.io/guidelines","https://review.utopian.io/result/8/3-2-3-1-3-2-3-3-","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"} |
created | 2019-01-26 17:08:12 |
last_update | 2019-01-26 17:08:12 |
depth | 1 |
children | 1 |
last_payout | 2019-02-02 17:08:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 8.351 HBD |
curator_payout_value | 2.684 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,380 |
author_reputation | 599,460,589,822,571 |
root_title | "[Steemconnect + Php] Withdraw Vesting Routes Changing System build by PHP & STEEMCONNECT - part 3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 78,974,313 |
net_rshares | 22,348,513,698,472 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
codingdefined | 0 | 23,428,594,075 | 20% | ||
espoem | 0 | 28,165,331,332 | 15% | ||
utopian-io | 0 | 22,071,606,303,679 | 15.4% | ||
jaff8 | 0 | 123,516,928,241 | 75% | ||
cheneats | 0 | 576,893,530 | 3% | ||
nokodemion | 0 | 148,142,771 | 3.3% | ||
amosbastian | 0 | 51,066,058,160 | 20.7% | ||
nenya | 0 | 407,418,452 | 80% | ||
sudefteri | 0 | 4,123,320,450 | 100% | ||
reazuliqbal | 0 | 12,572,182,253 | 10% | ||
statsexpert | 0 | 8,373,853,602 | 100% | ||
ulockblock | 0 | 12,206,736,213 | 4.51% | ||
nijn | 0 | 382,590,073 | 80% | ||
quenty | 0 | 3,801,698,023 | 60% | ||
curbot | 0 | 2,485,060,601 | 100% | ||
ascorphat | 0 | 908,612,988 | 2.5% | ||
nimloth | 0 | 368,619,808 | 80% | ||
trailreward | 0 | 419,090,474 | 4% | ||
yff | 0 | 3,956,263,747 | 100% |
Thank you for your review, @portugalcoin! Keep up the good work!
author | utopian-io |
---|---|
permlink | re-re-nawab69-steemconnect-php-withdraw-vesting-routes-changing-system-build-by-php-steemconnect-part-3-nb1tlbp7-20190126t170813126z-20190129t120541z |
category | utopian-io |
json_metadata | "{"app": "beem/0.20.17"}" |
created | 2019-01-29 12:05:42 |
last_update | 2019-01-29 12:05:42 |
depth | 2 |
children | 0 |
last_payout | 2019-02-05 12:05:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 64 |
author_reputation | 152,955,367,999,756 |
root_title | "[Steemconnect + Php] Withdraw Vesting Routes Changing System build by PHP & STEEMCONNECT - part 3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 79,104,230 |
net_rshares | 0 |
#### Hi @nawab69! Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation! Your post is eligible for our upvote, thanks to our collaboration with @utopian-io! **Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
author | steem-ua |
---|---|
permlink | re-steemconnect-php-withdraw-vesting-routes-changing-system-build-by-php-steemconnect-part-3-nb1tlbp7-20190126t171007z |
category | utopian-io |
json_metadata | "{"app": "beem/0.20.14"}" |
created | 2019-01-26 17:10:09 |
last_update | 2019-01-26 17:10:09 |
depth | 1 |
children | 0 |
last_payout | 2019-02-02 17:10:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 286 |
author_reputation | 23,214,230,978,060 |
root_title | "[Steemconnect + Php] Withdraw Vesting Routes Changing System build by PHP & STEEMCONNECT - part 3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 78,974,407 |
net_rshares | 0 |
Congratulations @nawab69! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) : <table><tr><td>https://steemitimages.com/60x70/http://steemitboard.com/@nawab69/posts.png?201901261735</td><td>You published more than 10 posts. Your next target is to reach 20 posts.</td></tr> </table> <sub>_[Click here to view your Board](https://steemitboard.com/@nawab69)_</sub> <sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub> To support your work, I also upvoted your post! > Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
author | steemitboard |
---|---|
permlink | steemitboard-notify-nawab69-20190126t191417000z |
category | utopian-io |
json_metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
created | 2019-01-26 19:14:15 |
last_update | 2019-01-26 19:14:15 |
depth | 1 |
children | 0 |
last_payout | 2019-02-02 19:14:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 790 |
author_reputation | 38,975,615,169,260 |
root_title | "[Steemconnect + Php] Withdraw Vesting Routes Changing System build by PHP & STEEMCONNECT - part 3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 78,980,306 |
net_rshares | 0 |
Hey, @nawab69! **Thanks for contributing on Utopian**. We’re already looking forward to your next contribution! **Get higher incentives and support Utopian.io!** Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)). **Want to chat? Join us on Discord https://discord.gg/h52nFrV.** <a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
author | utopian-io |
---|---|
permlink | re-steemconnect-php-withdraw-vesting-routes-changing-system-build-by-php-steemconnect-part-3-nb1tlbp7-20190127t133114z |
category | utopian-io |
json_metadata | "{"app": "beem/0.20.17"}" |
created | 2019-01-27 13:31:15 |
last_update | 2019-01-27 13:31:15 |
depth | 1 |
children | 0 |
last_payout | 2019-02-03 13:31:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 589 |
author_reputation | 152,955,367,999,756 |
root_title | "[Steemconnect + Php] Withdraw Vesting Routes Changing System build by PHP & STEEMCONNECT - part 3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 79,012,314 |
net_rshares | 0 |