Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hey, I'm the blog author. You're right -- I'm just so used to using cURL for more complicated requests that the simpler solution skipped my mind. I'll update.


You may know already, but a lesser known feature of php is that you can pass a [stream context](http://php.net/manual/en/function.stream-context-create.php) as optional argument to most file-operations. This enables you to make fine grained http-control (post, headers etc.), still using `file_get_contents` and friends.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: