Я пытаюсь загрузить файл на свой сервер, чтобы клиент мог ежедневно получать обновленную статистику по домам, выставленным на продажу.
Эта ссылка предоставляется для загрузки, но когда я пытаюсь с помощью curl, я получаю неверный ответ аргументов , Кто-нибудь может помочь с этим?
$host = "https://www.redfin.com/stingray/api/gis-csv?al=3&market=chicago&min_stories=1&num_homes=350&ord=redfin-recommended-asc&page_number=1&sf=1,2,5,6,7&status=9&uipt=1&user_poly=-88.215408%2042.393037%2C-88.215408%2042.393037%2C-88.215408%2042.393544%2C-88.215408%2042.394558%2C-88.215408%2042.394558%2C-88.215408%2042.395066%2C-88.215408%2042.395573%2C-88.215408%2042.39608%2C-88.215408%2042.396587%2C-88.215408%2042.397094%2C-88.215408%2042.397601%2C-88.215408%2042.397601%2C-88.215408%2042.398615%2C-88.216095%2042.399122%2C-88.216095%2042.399629%2C-88.216095%2042.400136%2C-88.216095%2042.400643%2C-88.216095%2042.40115%2C-88.216095%2042.401657%2C-88.216095%2042.402164%2C-88.216095%2042.402672%2C-88.216095%2042.402672%2C-88.216095%2042.403179%2C-88.216095%2042.403179%2C-88.216095%2042.403686%2C-88.216095%2042.403686%2C-88.216782%2042.404193%2C-88.216782%2042.4047%2C-88.216782%2042.405714%2C-88.216782%2042.405714%2C-88.216782%2042.406728%2C-88.216782%2042.407235%2C-88.216782%2042.407235%2C-88.216782%2042.407742%2C-88.216782%2042.408756%2C-88.216782%2042.408756%2C-88.216782%2042.409263%2C-88.216782%2042.409263%2C-88.216782%2042.40977%2C-88.216782%2042.410784%2C-88.216782%2042.411291%2C-88.216095%2042.411291%2C-88.215408%2042.411797%2C-88.214722%2042.412304%2C-88.214035%2042.412811%2C-88.213348%2042.413318%2C-88.212662%2042.413825%2C-88.211975%2042.413825%2C-88.211288%2042.413825%2C-88.211288%2042.414332%2C-88.210602%2042.414839%2C-88.209915%2042.414839%2C-88.209915%2042.414839%2C-88.209229%2042.415346%2C-88.208542%2042.415346%2C-88.207855%2042.415346%2C-88.207169%2042.415346%2C-88.206482%2042.415853%2C-88.205795%2042.415853%2C-88.205109%2042.415853%2C-88.205109%2042.415853%2C-88.204422%2042.415853%2C-88.203735%2042.415853%2C-88.203735%2042.415853%2C-88.203049%2042.415853%2C-88.202362%2042.415853%2C-88.201675%2042.415853%2C-88.200989%2042.415853%2C-88.199615%2042.415346%2C-88.199615%2042.415346%2C-88.198929%2042.414332%2C-88.198242%2042.413825%2C-88.197556%2042.413318%2C-88.196869%2042.412811%2C-88.196182%2042.411797%2C-88.196182%2042.411797%2C-88.194809%2042.411291%2C-88.194809%2042.410784%2C-88.194122%2042.410784%2C-88.194122%2042.410277%2C-88.193436%2042.40977%2C-88.193436%2042.409263%2C-88.192749%2042.408756%2C-88.192749%2042.408756%2C-88.192062%2042.408249%2C-88.192062%2042.408249%2C-88.192062%2042.407742%2C-88.191376%2042.407742%2C-88.191376%2042.407235%2C-88.191376%2042.406728%2C-88.191376%2042.406728%2C-88.190689%2042.406221%2C-88.190689%2042.405207%2C-88.190002%2042.4047%2C-88.189316%2042.404193%2C-88.189316%2042.403179%2C-88.188629%2042.402672%2C-88.188629%2042.402672%2C-88.187943%2042.401657%2C-88.187943%2042.40115%2C-88.187943%2042.40115%2C-88.186569%2042.400643%2C-88.186569%2042.399629%2C-88.185883%2042.399629%2C-88.185196%2042.399122%2C-88.185196%2042.399122%2C-88.184509%2042.398615%2C-88.183823%2042.397601%2C-88.183823%2042.397601%2C-88.183136%2042.397094%2C-88.182449%2042.396587%2C-88.182449%2042.396587%2C-88.181763%2042.395573%2C-88.181763%2042.395066%2C-88.181076%2042.394558%2C-88.181076%2042.394558%2C-88.180389%2042.393544%2C-88.179703%2042.393544%2C-88.179016%2042.393037%2C-88.177643%2042.392023%2C-88.176956%2042.391516%2C-88.17627%2042.390501%2C-88.174896%2042.38898%2C-88.17421%2042.38898%2C-88.172836%2042.386951%2C-88.17215%2042.38543%2C-88.171463%2042.384923%2C-88.171463%2042.384416%2C-88.171463%2042.383401%2C-88.171463%2042.382894%2C-88.171463%2042.382387%2C-88.171463%2042.381372%2C-88.171463%2042.381372%2C-88.171463%2042.379851%2C-88.17215%2042.378836%2C-88.172836%2042.378836%2C-88.172836%2042.377822%2C-88.172836%2042.377315%2C-88.173523%2042.377315%2C-88.173523%2042.376807%2C-88.17421%2042.375793%2C-88.174896%2042.374778%2C-88.175583%2042.373764%2C-88.176956%2042.372749%2C-88.176956%2042.372242%2C-88.179016%2042.37072%2C-88.179703%2042.370213%2C-88.179703%2042.369706%2C-88.180389%2042.369706%2C-88.180389%2042.368691%2C-88.180389%2042.368691%2C-88.181076%2042.368184%2C-88.181763%2042.368184%2C-88.181763%2042.367676%2C-88.182449%2042.366662%2C-88.183823%2042.366662%2C-88.184509%2042.365647%2C-88.185196%2042.36514%2C-88.185883%2042.364632%2C-88.186569%2042.364632%2C-88.187256%2042.363618%2C-88.187256%2042.363618%2C-88.187943%2042.363618%2C-88.188629%2042.363618%2C-88.190002%2042.363618%2C-88.192062%2042.36311%2C-88.192749%2042.362603%2C-88.195496%2042.362603%2C-88.198242%2042.362096%2C-88.198929%2042.361588%2C-88.200989%2042.361588%2C-88.203049%2042.361081%2C-88.203735%2042.361081%2C-88.205109%2042.361081%2C-88.205795%2042.361081%2C-88.206482%2042.361081%2C-88.207855%2042.360573%2C-88.207855%2042.360573%2C-88.209915%2042.360573%2C-88.211288%2042.360573%2C-88.212662%2042.360066%2C-88.214035%2042.360066%2C-88.215408%2042.360066%2C-88.216782%2042.360066%2C-88.217468%2042.360066%2C-88.218155%2042.360066%2C-88.220215%2042.360066%2C-88.220215%2042.360066%2C-88.221588%2042.360066%2C-88.222275%2042.360066%2C-88.222961%2042.360066%2C-88.224335%2042.360066%2C-88.225021%2042.360066%2C-88.225708%2042.360066%2C-88.225708%2042.360573%2C-88.226395%2042.360573%2C-88.226395%2042.360573%2C-88.226395%2042.361081%2C-88.226395%2042.361588%2C-88.226395%2042.362096%2C-88.226395%2042.362096%2C-88.226395%2042.362603%2C-88.226395%2042.36311%2C-88.226395%2042.364125%2C-88.226395%2042.364125%2C-88.226395%2042.364632%2C-88.226395%2042.36514%2C-88.226395%2042.365647%2C-88.226395%2042.366154%2C-88.226395%2042.366662%2C-88.226395%2042.367169%2C-88.225708%2042.367676%2C-88.225708%2042.368184%2C-88.225708%2042.368691%2C-88.225021%2042.369706%2C-88.225021%2042.37072%2C-88.225021%2042.371735%2C-88.225021%2042.372749%2C-88.225021%2042.373764%2C-88.225021%2042.374271%2C-88.225021%2042.375286%2C-88.224335%2042.3763%2C-88.224335%2042.377822%2C-88.224335%2042.378329%2C-88.223648%2042.379344%2C-88.222961%2042.380358%2C-88.222961%2042.380865%2C-88.222275%2042.381372%2C-88.221588%2042.381372%2C-88.221588%2042.381372%2C-88.220901%2042.381372%2C-88.220215%2042.381372%2C-88.220215%2042.38188%2C-88.219528%2042.38188%2C-88.219528%2042.382387%2C-88.218842%2042.382894%2C-88.218842%2042.383401%2C-88.218155%2042.383908%2C-88.217468%2042.384416%2C-88.217468%2042.384416%2C-88.216095%2042.38543%2C-88.215408%2042.385937%2C-88.215408%2042.385937%2C-88.214722%2042.386444%2C-88.214722%2042.387459%2C-88.214722%2042.387459%2C-88.214722%2042.387966%2C-88.214722%2042.387966%2C-88.214722%2042.388473%2C-88.214722%2042.389487%2C-88.212662%2042.38898%2C-88.215408%2042.393037&v=8&wf=true";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $host);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible ; Googlebot/2.1 ; +http://www.google.com/bot.html)');
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$data = curl_exec($ch);
if (curl_errno($ch)) die(curl_error($ch));
curl_close($ch);
print_r($data); // prints the contents of the collected file before writing..