hide download link

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
html20009876
Forum Newbie
Posts: 3
Joined: Sun May 04, 2008 3:42 am

hide download link

Post by html20009876 »

how to hide download link?

E.g.

I have a zip file:
http://www.mysite.com/path/to/my.zip

I hope use can download the zip file without seeing its link from any download tools.

I need php code.

Thanks
User avatar
Kastor
Forum Newbie
Posts: 24
Joined: Thu May 01, 2008 2:29 am
Location: Grodno, Belarus
Contact:

Re: hide download link

Post by Kastor »

:wink:

Code: Select all

<?php
header('Content-type: application/zip');
header('Content-Disposition: attachment; filename="'.$zip_file.'"');
echo readfile($zip_file);
?>
Post Reply