Specifying a User Agent when using file_get_contents() in PHP

1 · Josh Sherman · June 4, 2013, midnight
I recently encountered a scenario where one of my site’s login system stopped working. The piece of code that stopped working was the third-party login that leveraged GitHub for the authentication. It was one of those “it worked yesterday” moments for sure. After some research, I discovered that GitHub had......