
StormriderBOT in the works???
So you're a coder?
Yup. I've been programming now for 27 years. In PHP for 20 years. Professionally for 17 years. Self-employed for 12 years.
So you can write a bot right?
Well, erm... maybe. Knowing how to program is one thing, knowing how to program a specific application is a little more complex. You have to use someone else's framework and, let's not beat around the bush, the steem API isn't exactly well documented.
So why PHP and not JQuery - there's a spiffy JQuery library you know?
Yep, and I originally wrote it all in JQuery but that has to be run in a browser. Great for making tools, useless for making a bot unless you're willing to leave your browser window open 24/7 and know it won't crash ever.
So how far are you?
So right now I can connect to an open free node, https://steemd.steemit.com, and I can fetch node version information, account information, posts, comments etc. I can basically do all of the information READING (other than the market information - that will come later).
I'm using CURL to connect, format a POST query and handle the returned information. Some of those information blocks are formatted differently and I'm not 100% on the rhyme or reason behind it but some trial and error got me there.
Right now I have lots of blocks of code that I'm reformatting into 1 single toolkit. I'm fetching information on my 2 accounts and my wife's account, reading the voting power and I'm about to look at fetching the most recent posts and comments. Combining that I can then say whether any of the accounts are full on voting power (and should spend some to avoid wasting it) or are too low and should conserve it.
So you're just circle-jerking? You asshat!
No, not quite. I'm using this as a test case. Bear in mind that my second account has 1 single post to its name and has naff all Steem Power. Add to that, I always upvote my wife and she always upvotes me anyway... we kinda love each other, y'know? (barf!)
So what's next?
Well right now the system reads but it doesn't write. It can't post, comment or vote. I'm reliably informed that posting through PHP without going via piston or some other external library is a major ball ache. It must be possible, or so my mind tells me, but as for actually how... I'm not 100%. If it can be done via JQuery though then surely PHP can do the same.
So where is all this going?
I'd like to create a system similar to steemvoter for the MSP. Steemvoter is limited in that it steals/charges a vote every day from everyone signed up to it AND limits how many accounts you can follow unless you pay a subscription.
Also, I'd be interested in creating an upvote bot of my own, not be cause steem needs another bot but just because it sounds like an interesting project.
To end...
Anyway, stay tuned, this won't be the last post on this, in fact I'm pretty sure the next one will be very soon regarding the issues of fetching voting power (nothing is ever simple!). So who wants to see some code examples in the next post? Let me know!!!
Supporter of: MSP, TeamGB, MuxxyBot and many more
I need a proper signature!
If you want to help please comment below!
as i know PHP has not it's steem library. i found some fork which uses steem.js but it cant run on server means you can't do server staff, right? so if you want your bot to make something client must connect without client everything will die. i find more superior python steem api. soo powerful and functional. ive made a bot which you give posting key and others will so... it needs 6 man and they will exchange upvotes to a given post url. you basically will get 5 upvote. i wish i had more ideas to bring up in steem field.
Hello @stormriderstudio you can use https://github.com/davidkevork/steemphp which is being developed by me to fetch anything from the blockchain and soon you will be able to even upvote comment and post articles through it where no other php code has the same functionality as steemphp will have
It was actually your code and lukestokes that set me on the right path with this.
Please don't be offended if I don't use your code, it's not that I think it's bad/wrong/inferior at all, I just prefer writing things for myself - I enjoy the journey :)
I am, of course, more than happy to share ideas and bounce things back and forth between us if you're interested?
I ended up installing piston on my webserver in the meantime but I'm slowly learning python and I swear there must be a way to post to the blockchain with just PHP.
Thanks!
I just wanted to share my code here to others and everyone is free to use whichever code they prefer
Way over my head. Glad you sort of understand it.
Nice job so far. I haven't touched PHP in years but it's good to see people are developing for Steem in all kinds of languages. I'll keep an eye on your posts, I have the feeling I might learn something from it :)
Much appreciated. I'm planning to tackle all the problems I come across and discussing them. Look forward to your future comments (and those sweet sweet upvotes ;) )
Congratulations! This post has been upvoted from the communal account, @minnowsupport, by Stormriderstudio from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews/crimsonclad, and netuoso. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.
This post has received a 0.45 % upvote from @drotto thanks to: @banjo.