For debugging, use `curl_getinfo($ch)` after execution. It gives you HTTP status, timings, etc.
Your curl_init get request is correct, but APIs sometimes redirect. Add:
```php
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
```
to handle 3xx redirects automatically.
Your curl_init get request is correct, but APIs sometimes redirect. Add:
```php
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
```
to handle 3xx redirects automatically.
