Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Remote URL - dodanie możliwości pobierania wielu plików.
jar001
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 10.03.2015

Ostrzeżenie: (0%)
-----


Cześć!
Znalazłem gdzieś skrypt do pobierania plików z innych stron na mój serwer. Wygląda on tak:

  1. <title>Panel pobierania</title>
  2. <center>
  3. <head>
  4. <style>
  5. Tutaj są style...
  6. </style>
  7. </head>
  8. <font size='5'>Panel pobierania</font><br><br>
  9. <? include("juz1.php"); ?> <!-- Wczytanie skryptu logowania -->
  10. <br><br><form method="post">
  11. <input name="url" size="50" class='pole' ></input><br><br><br>
  12. <input name="submit" type="submit" class='wyslij' value='Pobierz!' />
  13. </form>
  14.  
  15.  
  16. <?php
  17.  
  18. // maximum execution time in seconds
  19. set_time_limit (24 * 60 * 60);
  20.  
  21. if (!isset($_POST['submit'])) die();
  22.  
  23. // folder to save downloaded files to. must end with slash
  24. $destination_folder = 'pliki/';
  25.  
  26. $url = $_POST['url'];
  27. $newfname = $destination_folder . basename($url);
  28.  
  29. $file = fopen ($url, "rb");
  30. if ($file) {
  31. $newf = fopen ($newfname, "wb");
  32.  
  33. if ($newf)
  34. while(!feof($file)) {
  35. fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );
  36. }
  37. }
  38.  
  39. if ($file) {
  40. fclose($file);
  41. }
  42.  
  43. if ($newf) {
  44. fclose($newf);
  45. }
  46.  
  47. ?>
  48. </center>


I teraz pytanie; jak dodać do tego możliwość wgrywania 5 plików na raz?

f5

f5

f5
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.12.2025 - 20:16