(edited 3 weeks ago)
My epic programming setup 😎I programmed the entirety of Poll+ like this and I don't intend to ever use anything elsecode shown is irrelevant
I used this same app to program https://gplustf2.com back in the day. lol.
@James Shiffer Nice. It's a terrible app but it's pretty much the only one available for iOS.
>notices http://poogleplus.com/assets/php/OwO what's this?
Never mind how you put your login tokens in a path inside the document root...Also, with json_decode(), you never know when something is gonna screw up, but the problem is it doesn't throw an exception unless you pass in the JSON_THROW_ON_ERROR flag for the fourth argument (see: https://www.php.net/manual/en/function.json-decode.php ). Then you can use a try-catch to gracefully handle any exceptions. Otherwise, you have to manually look for any errors (json_last_error()) before proceeding. If you do no error-checking but your script reads malformed JSON, your var $info will be NULL and then your code immediately after will likely crash your script (with an error like 'Undefined index').
Actually, it looks like something even more insidious will happen: $info['expires'] actually doesn't fail, it just returns NULL as well, making the comparison with time() always true, and then it will try to generate a new token without an actual refresh token, and who knows where the domino effect will take it from there. In any case, it becomes annoying to debug.
@James Shiffer Ha yeah the poogleplus backend isn't even protected anyway lmao. Not that you'd find anything particularly interesting there though.The login tokens were just for PollBots and aren't even there anymore so it's not like it matters much. I just didn't have SQL set up on this server.There's no reason the json decoding would ever give an error afaik. Even if it did the only thing that would happen is the newtoken function would kill the script. The script isn't important for anything either, it was just for PollBots.
Ah, yes, the infamous PollBots.Thanks for 100 followers!
Using PHP as a regular scripting language like you did here is totally possible but it just feels weird to use it for anything but backend. Once, I saw a Qt implementation that someone wrote in PHP 5, but... why?
These were MeWe PollBots, I had 1500 of them but MeWe finally caught on.I used PHP because I already had all the MeWe functions made.
how and why
@surepy Because I like programming on mobile since I'm never at a computer and there aren't many apps available on iOS for that
Also I forgot to mention this is all on a 4.0" iPhone SE :)
No syntax highlighting. No linting or error-checking. Nice.I guess you don’t need error checking if you don’t make errors ever ;)
Word wrap is annoying too. Especially on a 4 inch screen.
i gave up using FTPmanager for Termius, then i can just use vim over SSH.
@Poll Person at least use a bluetooth keyboard pls thx
@surepy No thanks I'll keep using the iOS keyboard with autocorrect turned on ;)
oh my god
that's amazing, dragon warrior.
I don't understand how you can do that. Even with syntax highlighting, it feels really weird for me to code on mobile.
(edited 3 days ago)
But there is syntax highlighting.Pic related is some random php code I wrote in 2015
They removed it a few months ago for some reason lmao
I took the screenshot right before the comment was written tho
also yeah i noticed the guy put some features behind a paywall, FTPManager started going downhill ever since the icon changed from blue to orange
Oh yeah nvm this is FE explorer which is the exact same app except slightly different an doesn't have highlighting for some reason. I'm not sure why I switched to this version but I know I had some reason.
You must log in to comment.
Are you sure you want to delete this? The post will remain "trashed," but not truly deleted, for 30 days. Admins may still permanently delete it manually before that time.