[ [M4rk0] @ 01.02.2007. 00:47 ] @
Pozdrav svima!

Molio bih primjer koda za remote url upload...

Znaci da skripti posaljem link i ona na server downloadira taj link...

Ako je moguce da ispise kojom brzinom skida i koliko jos MB do kraja...

Zahvaljujem unaprijed!
[ Jbyn4e @ 01.02.2007. 08:12 ] @
http://www.php.net/curl
Pa citaj. Mozda ima i jos nekih metoda, ali ove sam se prve setio.
Pogledaj example1
[ [M4rk0] @ 01.02.2007. 09:12 ] @
Ma pronaso sam neka rijesenja samo to sad treba iskombinirat da prikazuje kojom je brzinom skinuto i slicno...

Code:
function download ($file_source, $file_target)
{
  // Preparations
  $file_source = str_replace(' ', '%20', html_entity_decode($file_source)); // fix url format
  if (file_exists($file_target)) { chmod($file_target, 0777); } // add write permission

  // Begin transfer
  if (($rh = fopen($file_source, 'rb')) === FALSE) { return false; } // fopen() handles
  if (($wh = fopen($file_target, 'wb')) === FALSE) { return false; } // error messages.
  while (!feof($rh))
  {
   // unable to write to file, possibly because the harddrive has filled up
   if (fwrite($wh, fread($rh, 1024)) === FALSE) { fclose($rh); fclose($wh); return false; }
  }

  // Finished without errors
  fclose($rh);
  fclose($wh);
  return true;
}