Big Commerce API PHP Wrapper
Big Commerce is a hosted e-commerce platform. You are given FTP credentials to access the few static files you are allowed to manipulate... and you have an API. For various reasons, I had to interact with the Big Commerce API and since there was a serious lack of code (and decent documentation), I figured I'd put together my own little wrapper. Should be pretty self-explanatory if you're here. Needless to say, this code comes as-is with no support from me whatsoever.
OAuth, Timestamps and VPSes
During yesterday's #HackEmail, I was hacking away on a little Context.IO/Dropbox application to allow users to send files to their Dropbox by email. I only had a few hours to come up with a working prototype to have a shot at taking first place and the glorious iPad that came with it... however, I ran into a problem.
See, the OAuth protocol uses timestamps and nonces to validate requests. Should the timestamp of the requestee be negative or inferior to the timestamp of the requested, the request will fail and the whole OAuth workflow will fail, and chances are you'll have no goddamn clue why. Fear not! I experienced it, so I had to understand it.
