Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Guides and examples #3

Adds your guides and examples here.

  • replies 1
  • views 2.6K
  • likes 0
#2

Download large file via cURL in Koseven

// Pass URL file
$request = new Request('download_url');

// e.g. write into temporary file
$temp = fopen('php://temp', 'w');

/**
 * Parameters must pass by client() only !

 * @var $client Request_Client_External
 */
$client = $request->client();
$client->options(CURLOPT_RETURNTRANSFER, 1); // Before CURLOPT_FILE !
$client->options(CURLOPT_FILE, $temp);

// Optional
$client->options(CURLOPT_TIMEOUT, Date::MINUTE * 2);

$request->execute();

// ...

fclose($temp);