Skip to content

Instantly share code, notes, and snippets.

@djaoka
Created July 18, 2013 13:39
Show Gist options
  • Save djaoka/6029364 to your computer and use it in GitHub Desktop.
Save djaoka/6029364 to your computer and use it in GitHub Desktop.
<?php
ignore_user_abort();
function copyFileUrl($sFichier_url){
$sUrl = @fopen($sFichier_url, "rb");
if($sUrl != 0){
$sLocal = fopen($_SERVER['DOCUMENT_ROOT'].'/images/periods/tickets/159/293/conditions.jpg', "wb");
while(!feof($sUrl)){
$paquet = fread($sUrl, 65536);
fwrite($sLocal, $paquet, 65536);
}
fclose($sLocal);
fclose($sUrl);
}
}
copyFileUrl("http://img802.imageshack.us/img802/8950/conditions.jpg");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment