Advertisement
ssaidz

index.php - upload file via url and rename it

Nov 29th, 2023
700
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <form action="upload.php" method="post">
  6.   URL File: <input type="text" name="file_url"><br>
  7.   Nama Baru: <input type="text" name="new_name"><br>
  8.   <input type="submit" value="Upload" name="submit">
  9. </form>
  10. <?php
  11. // Memeriksa apakah file_get_contents aktif
  12. if (ini_get('allow_url_fopen')) {
  13.     echo 'file_get_contents aktif';
  14. } else {
  15.     echo 'file_get_contents nonaktif';
  16. }
  17.  
  18. echo '<br>';
  19.  
  20. // Memeriksa apakah cURL aktif
  21. if (function_exists('curl_version')) {
  22.     echo 'cURL aktif';
  23. } else {
  24.     echo 'cURL nonaktif';
  25. }
  26. ?>
  27. </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement