fopen($outFileName, 'w'), CURLOPT_TIMEOUT => 28800, // set this to 8 hours so we dont timeout on big files CURLOPT_URL => $url ); $ch = curl_init(); curl_setopt_array($ch, $options); curl_exec($ch); curl_close($ch); } } $cnt=downloadUrlToFile("https://esan68.sillapa.net/sp-center/?name=report&file=show_rank_static", "result68/last.txt"); ?>