Home >Backend Development >PHP Tutorial >PHP download remote file

PHP download remote file

WBOY
WBOYOriginal
2016-07-25 08:42:35937browse
  1. if ($_GET[xfer]) {
  2. if ($_POST[from] == "") {
  3. print "You forgot to enter a url.";
  4. } else {
  5. copy("$_POST[from]", "$_POST[to]");
  6. $size = round((filesize($_POST[to])/1000000), 3);
  7. print "transfer complete.
  8. $_POST[from]
  9. $_POST[to] : $size MB";
  10. }
  11. } else {
  12. print "
  13. from(http://):
  14. to(filename):
  15. ";
  16. }
  17. ?>
复制代码

PHP


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn