You could also use Guzzle instead of raw curl. Way cleaner syntax:
```php
$client = new \GuzzleHttp\Client();
$response = $client->get('https://example.com/api');
```
But if you’re stuck with curl, your code’s fine—just add error checks!
```php
$client = new \GuzzleHttp\Client();
$response = $client->get('https://example.com/api');
```
But if you’re stuck with curl, your code’s fine—just add error checks!
