且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用PHP curl命令行发送标题?

更新时间:2023-02-21 22:50:19

curl 选项,可以多次使用:

Headers for curl are set with the -H option, which can be used multiple times:

curl -H "Header-1: Value" -H "Header-2: Value" http://example.com

注意 PHP有一个 curl库。所以你不必使用 exec()

Note: If installed, PHP has a curl library. So you don't have to use exec().