-2

I tried downloading a directory folder using wget, and it seems to have worked properly. However all the PHP files are empty. I know that they should not be empty as they show a file size on the web directory.

The folder I am trying to download is here:

https://www.isuperman.tw/wp-content/plugins/automatewoo-referrals/

I used these directions to download recursively with wget.

How to download HTTP directory with all files and sub-directories as they appear on the online files/folders list?

Any ideas on why they are downloading blank/empty?

inputchip
  • 107
  • 3
  • 13
  • 1
    I would suspect that there's an error in your code. – Obsidian Age Jul 06 '18 at 03:13
  • All the other files downloaded properly, just not the PHP files. Even if I try and save the file through my browser it's blank. – inputchip Jul 06 '18 at 03:19
  • I used this command `wget -r -e robots=off -np -nH --cut-dirs=2 -R index.html https://www.isuperman.tw/wp-content/plugins/automatewoo-referrals/` – inputchip Jul 06 '18 at 03:25

1 Answers1

1

view-source:https://www.isuperman.tw/wp-content/plugins/automatewoo-referrals/automatewoo-referrals.php

nope the files are empty, doesnt matter whats the content of the files.. if you use wget to download a file, wget simulates A browser and get the parsed php content from the server...

and these seems to be empty

if you want to download the files with php, use ftp or the server must not parse these files and deliver its raw content

Kapsonfire
  • 1,013
  • 5
  • 17
  • This is the correct answer, BUT I wont suggest to disable parsing. Instead you could write a small wrapper, zipping the folder for you and return it for you to download. – Kapsonfire Jan 01 '21 at 09:48