← All built-ins / http_get()
http_get()
http_get(string $s): mixed
Parameters
| Name | Type | Description |
|---|---|---|
| $url | string | http:// URL (TLS is not supported) |
Return value
["status" => 200, "body" => …, "contentType" => …] on success, false on failure.
Example
$r = http_get("http://localhost:1/unreachable");
echo $r === false ? "offline-safe" : "unexpected";offline-safe