How to convert curl "-b" tag into php curl? How to convert curl "-b" tag into php curl? curl curl

How to convert curl "-b" tag into php curl?


It has already been answered hundreds of times. But just in case, let's copy it here again for those who can't find it.

-b means "COOKIE".

# sending manually set cookiecurl_setopt($ch, CURLOPT_HTTPHEADER, array("Cookie: PVEAuthCookie=PVE:root@pam:4EEC61E2::rsKoApxDTLYPn6H3NNT6iP2mv..."));# sending cookies from filecurl_setopt($ch, CURLOPT_COOKIEFILE, $ckfile);