Can PHP use curl to send requestheader and then download the file directly?

Source: Internet
Author: User
PHP uses curl to send the cookie, referer, and other requestheaders before the location jump. Does the session server receive the requestheader? If not, how can I directly download the text that requires cookie verification through PHP without setcookie on the server... PHP uses curl to send the cookie, referer, and other request headers before the location jump. Does the session server receive the request header?

If not,
If the server does not have a setcookie, how can I directly download the files that require cookie verification to the client through PHP.
My previous idea was to send a cookie to the server through php curl, and then redirect the header location. Unfortunately, no.

I am doing this to enable flash/html5 to play the video files that require cookie verification without setcookie on the server.

Reply content:

PHP uses curl to send the cookie, referer, and other request headers before the location jump. Does the session server receive the request header?

If not,
If the server does not have a setcookie, how can I directly download the files that require cookie verification to the client through PHP.
My previous idea was to send a cookie to the server through php curl, and then redirect the header location. Unfortunately, no.

I am doing this to enable flash/html5 to play the video files that require cookie verification without setcookie on the server.

Since the server does not have a secookie, what should I use to verify the cookie? You have the problem described.

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.