Hello there
Today I am making up for introducing a project I wrote for Steemit.
To briefly explain the purpose of the project:
A web project that shows your account's pending payments.
You can see the total amount to be paid with this project written with SteemJS Api support.
So you will not have to constantly calculate.
I think this project using PHP and HTML will be of great benefit to Steemit users.
There are 3 files in the project.
-index.php
-result.php
-logo.png
https://github.com/oguzdelioglu/Steemit-Pending-Payouts-Checker-PHP
Index.php
The form page used to enter the user data the user wants to query.
result.php
The results page showing the user's outstanding payments using the SteemJS API system.
logo.png
The Steemit Platform's Logo.
Codes
Index.php
<html>
<body>
<center>
<img width="400" height="200" src="logo.png" alt="Steemit">
<form action="result.php">
Your Steemit Account Name<br>
<input type="text" style="text-align:center;" name="username" value="odl">
<br> <br>
<input type="submit" value="Check Pending Payouts">
</form>
</center>
</body>
</html>
Result.php
<?php
$username = $_GET["username"];
$url = 'https://api.steemjs.com/get_discussions_by_blog?query={"tag":"'.$username.'","limit":"100"}';
$json= file_get_contents($url);
$data = json_decode($json,true);
echo '<style>
a {
text-decoration:none;
}
a:visited {
color: darkgreen;
}
</style>';
echo '<body link="darkgreen">';
echo '<meta name="viewport" content="width=device-width, initial-scale=1">';
echo '<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">';
echo '<center><a href="index.php">
<img border="0" alt="Steemit" src="logo.png" width="400" height="200">
</a></center>';
echo '<div class="w3-container">';
echo '<table class="w3-table w3-striped w3-border" align="center">';
$total_price = 0;
foreach ($data as $item) {
try
{
if(!($item["pending_payout_value"]=="0.000 SBD"))
{
echo "<tr>";
$post_link = "https://www.steemit.com/@".$item["author"]."/".$item["permlink"];
$post_title = $item["title"];
$price = str_replace(" SBD", "", $item["pending_payout_value"]);
$total_price = $total_price + $price;
echo '<td><a target="_BLANK" href="'.$post_link.'"/>'.$post_title.'</td> <td>'.$item["pending_payout_value"].'</td>';
echo "</tr>";
wait(0.1);
}
}
catch(Exception $e)
{
}
}
echo '<center>Total SBD:'.$total_price.'</center>';
echo '</table>';
echo '</div>';
echo '</body>';
function wait($time)
{
usleep(1000000*$time);
ob_flush();
flush();
}
?>
If you have ideas or suggestions about the project, you can specify it as a comment.
Posted on Utopian.io - Rewarding Open Source Contributors
I really need this. I am new and I don't even really know how to calculate future payments, so an app that doesn't for me is helpful.
Good job! Keep up the good work!
Good post.I am upvote and comment your post.Please do same.
https://steemit.com/galaxy/@sornonil/what-is-the-radial-velocity-method
Congratulations @odl! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the total payout received
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Nice post..
I want to learn from you.
I wish
Congratulations, you have received a free upvote from @bonds!
Bonds offers a hedge against volatility as well as paid upvote and reSTEEM services.
Bonds is not a bot- this is run by humans, for humans.
Check out our #introduceyourself post to find- out more- if you like the idea, like or reSTEEM it, and we all benefit.
Happy STEEMing!
Great post. A small suggestion is could you please add comments your PHP code to let others know whats's going on and what each piece of code is doing. Helps with newbies to PHP and in debugging . Cheers!
This is an awesome project that will go many places. Perhaps writing it in different languages such as python would be nice
Thank you for sharing this. Maybe you should check out steem.supply. They offer this service already.
thanks for sharing
Hey @odl I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
This is promising now I know I can write apps using json and php using steem blockchain as the platform. Have been trying to make a bot with php and steem API, a curating bot for my community
I like your post and always Like your Post.. check my Wall post and Upvote :)
I like it! Subscribe to your blog!