How to properly use curl_init for a GET request in PHP? or Why is my curl_init GET request not workin

24 Replies, 2152 Views

If the API uses auth, you might need:
```php
curl_setopt($ch, CURLOPT_USERPWD, 'user:pass');
```
Or a token in headers. Check the API docs—curl_init get requests often fail cuz of missing auth.

Messages In This Thread



Users browsing this thread: 1 Guest(s)