CURL_INIT GET requests are like ordering pizza—you ask (request), they deliver (response). Here’s the simplest way:
```php
$curl = curl_init("https://httpbin.org/get");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($curl);
curl_close($curl);
print_r($output);
```
RETURNTRANSFER is like asking for the pizza to be handed to you instead of thrown at your face. Necessary? Yes, unless you like messy code.
For debugging, check out `curl_error()` if things go sideways.
```php
$curl = curl_init("https://httpbin.org/get");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($curl);
curl_close($curl);
print_r($output);
```
RETURNTRANSFER is like asking for the pizza to be handed to you instead of thrown at your face. Necessary? Yes, unless you like messy code.
For debugging, check out `curl_error()` if things go sideways.
