cUurl download size
Content
Hi,
I'm using cURL to get the contents of a file. At 5Mb it seems to break. Anything smaller and it's fine. Any reason why? Here is my code:
function getCSV($location){$array = Array();$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_VERBOSE, true);curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);$body = \curl_exec($ch);curl_close($ch);$Data = str_getcsv($body, ""); //parse the rowsforeach($Data as &$Row) $Row = str_getcsv($Row, ","); //parse the items in rowsreturn json_encode($Data);
1