Hello, I have to pull data from a feed using Curl in PHP. Once extracted, I write the result to my bank.
The problem is that the result of the call is giant. Is there any way to control this flow?
This is the code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://site.com/?_restfully=true&fromDate=2017-09-07");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$headers = array();
$headers[] = "Authorization: Bearer $token";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);