UTILITY

http_get()

Perform a GET request with cURL and return status, headers and body.

Signature

array http_get(string $url, array $options = [])

Example

$r = http_get('https://example.com'); echo $r['status'];

Extension: curl

Available from: 1.5.0

Reference navigation

Previous: http_delete()

Next: http_patch()

Back to utilities