Y
Hacker News
new
|
ask
|
show
|
jobs
by
fuzzmeister
5451 days ago
PHP function to perform a basic cURL request and return the result. Got a little bit tired of writing "curl_setopt(...".
1 comments
dmpatierno
5451 days ago
Typically this is what file_get_contents() is for (with fopen_wrappers enabled) if you just want a simple GET.
link
troels
5451 days ago
In newer versions of PHP, you can use `stream_context_create` to make post requests and more, using `file_get_contents`
link