A RECREATION (FORK) OF PHP STEEM TOOLS (An Open Source PHP Library For The Steem Blockchain )
This explains the process of forking a bugged php steemblockchain access tool (php steem tools – GITHUB ADDRESS ) to make a bug free and easily deployable version which is named (AKINGOS PHP STEEM-ACCESS TOOLS – GITHUB ADDRESS)
I have a different username there (akintunde102). So below is a logged in section proof.
Ever since I joined steemit, I have always wanted to tinker with the STEEMBLOCKCHAIN but I had been skeptical about the availability of php steem tools for php developers to easily have access to the blockchain . So I started sniffing around and I came across @dragosroua post about a A Collection Of PHP Tools For Interacting With The Steem Blockchain
He featured his own tool on the blog post which he dubbed the PHP Steem Tools . The gihub address is here but then he quickly pointed out in the post that it is “by no means a production-ready package,” .
So I downloaded it and for some reasons it didn’t work with my local server, WAMPSERVER 2.5 (PHP 5.5.12 , APACHE 2.4.9), so I started to work around with it.
The WEBSOCKET DEPENDENCY FILES were somewhat absent .
The first thing I did was to directly add all the files of the WEBSOCKET-PHP-MASTER that the script seriously depended on.
Below is a snapshot of the SRC FOLDER of both scripts.
OLD SRC FOLDER
THE NEW SRC FOLDER
Those extra files in my own scripts snapshot are the files the WEBSOCKET-PHP-MASTER depended upon, that was the best I could do at the moment to save time.
I guess he must have included the websocket script in a way that didn’t work with my version of WAMP , or maybe it was just a bug.
All I know was that errors of not finding the WEBSOCKETS file kept coming up.
The only thing I could find about the websocket file was in a composer.json file. It reads thus
{ "name": "dragos-roua/php-steem-tools", "description": "Tools to interact with the Steem blockchain.", "keywords": ["steemit", "blockchain", "package"], "license": "MIT", "authors": [ { "name": "Dragos Roua", "email": "dragosroua@gmail.com" } ], "type": "library", "require": { "php": ">=5.4", "textalk/websocket": "1.0.*" }, "require-dev": { "phpunit/phpunit": "5.2.*" }, "autoload": { "psr-4": { "DragosRoua\\PHPSteemTools\\": "src/" } } }
So, I knew he included it in a way but for some odd reasons it wouldn’t work in my local server and I believe being able to work with codes in a local development environment is highly important, more reason for the recreation.
Another issue I faced was for the file inclusion process and namespace issues. "My server didn’t like that idea", so I had to work around that. It wasn’t easy though, the source code seemed to be built around those namespaces , I had to change some codes so It could be compatible with the new inclusion.
Below is a snapshot of the changes.
His Inclusion Process
My Inclusion Process
There are many more changes I made that could be seen and compared if you check through the codes in the github channels.
I named the recreated (or forked) version, AKINGOS PHP STEEM-ACCESS TOOLS , AKINGOS is a combination of the first part of my name (AKINtunde) and the middle part of his username (draGOSroua).
Now, the funny part .
He added quite an hilarious license to his own version. Here it goes:
DON'T BE A dk PUBLIC LICENSE
Version 1, September 2017
Copyright (C) 2009 Dragos Roua dragosroua@gmail.com
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
DON'T BE A dk PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
Do whatever you like with the original work, just don't be a dk.
Being a dk includes - but is not limited to - the following instances:
1a. Outright copyright infringement - Don't just copy this and change the name.
1b. Selling the unmodified original with no work done what-so-ever, that's REALLY being a dk.
1c. Modifying the original work to contain hidden harmful content. That would make you a PROPER dk.
If you become rich through modifications, related works/services, or supporting the original work, share the love. Only a dk would make loads off this work and not buy the original works creator(s) a pint.**
Code is provided with no warranty. Using somebody else's code and bitching when it goes wrong makes you a DONKEY dk. Fix the problem yourself. A non-dk would submit the fix back..
The 'dk 'stands for an NFSW word that I wouldnt want to use here, You can read the license on the github page to know what I mean.
So I have adopted his own license too but I adjusted the dk part to PRICK, you can find that on the github page. I hope I am not being a PRICK.
More so, I hope to give him a portion of whatever I generate on this post according to the license, but the discretion of that is totally up to me. I will promise not to be a prick.
Conclusively, I will like to say that my version of the PHP STEEMTOOLS allows any developer with at least PHP 5.5 upwards to have access to the STEEM BLOCKCHAIN, all you need is just download and load it up straight to your server. Unlike his, this is production ready. More so, my own version has an example script that allows you to view the number of users (I wrote an article about it here) and to see the number of intending witnesses on steemit .
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Your contribution cannot be approved yet. See the Utopian Rules. Please edit your contribution to reapply for approval.
Can you format your code as code?
You may edit your post here, as shown below:
You can contact us on Discord.
[utopian-moderator]
It has been reedited @reggaemuffin
Thank you :)
As a future note, check out https://getcomposer.org/ and you will find a way to get all the missing libraries. It would be a good thing to check it out and see how it works for future projects :)
Thank you
it is sure ...
I love this bro ✅
Bravo ✅ I'm glad with your article
Thank you
Hey @akintunde 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
Funny license. Did you buy him a pint though? If not, you're being a dk.
Yes, I did. I sent him 0.5 sbd. That should be okay for a pint. LOL