HTML-Send a download request to a file, PHP can record the request, what can be done to record the request?

Source: Internet
Author: User
Tags readfile
Title, no code description.
or by configuring Apache, how to record this request

Reply content:

Title, no code description.
or by configuring Apache, how to record this request

download.php?file=work.zip
  
   

The simplest way: The user downloads the file first request, PHP writes the record to download the address, records the information you need. Then in the header function using PHP to jump to the actual download file address

 "!--? php$file_name = ' 9567b94e440700226e003fb9258dd733.png '; Download the filename header ("content-disposition:attachment;filename=". $file _name. ");  ReadFile ($file _name); $header = $_server[' http_user_agent '];   User Ua$ip = $_server[' remote_addr ']; User IP   
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.