function getRemotePage($model){ $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, BASE_REMOTE_URL . $model); $location = FILE_SAVE_LOCATION . $model . '.html'; $cURLhandle = fopen($location, 'w+'); curl_setopt($handle, CURLOPT_FILE, $cURLhandle); curl_exec($handle); fclose($cURLhandle); if( curl_errno($handle) ){ return false; } else { curl_close($handle); return true; } }