How to set header in curl in PHP?

Guanhui
Release: 2023-03-02 22:04:02
Original
12006 people have browsed it

How to set header in curl in PHP?

How to set header in curl in PHP?

In the PHP extension library curl, you can set the option constant "CURLOPT_HTTPHEADER" through the function "curl_setopt()" to set the header. When using it, just pass the header data into the third parameter.


        
Copy after login

Recommended tutorial: "PHP"

The above is the detailed content of How to set header in curl in PHP?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!