StJoesy
StJoesy

Reputation: 89

wget how to use ganerated name instaed of page name when downolad zip file

I would like save few important data form a server(A) to another server(B) hourly . I wrote a php script which compress all data into one zip file and generate name from current date time (A).

I want download this file from cpanel/cron with wget (B).

But the wget do not get the archive name just if my site domain.com/arcive.php The downloaded name will be archive.php instead of 2014050120112.zip.

B server do not know the name of archive.

Is there any way to wget accept the file generated file name? (header("Content-Disposition: attachment; filename={$filename}");)

Upvotes: 0

Views: 68

Answers (1)

darnir
darnir

Reputation: 5180

Yes, it's there in the man pages too!

Use the --content-disposition option.

Upvotes: 0

Related Questions