HN2
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
fuzzmeister
on July 16, 2011
|
parent
|
context
|
favorite
| on:
Ask HN: What's your most-used function that you wr...
PHP function to perform a basic cURL request and return the result. Got a little bit tired of writing "curl_setopt(...".
dmpatierno
on July 16, 2011
[–]
Typically this is what file_get_contents() is for (with fopen_wrappers enabled) if you just want a simple GET.
troels
on July 16, 2011
|
parent
[–]
In newer versions of PHP, you can use `stream_context_create` to make post requests and more, using `file_get_contents`
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: