Is it possible to set the cookie content with CURL?

You can use curl_setopt with the CURLOPT_COOKIE constant:

<?php
// create a new cURL resource
$ch = curl_init();

// cookies to be sent
curl_setopt($ch, CURLOPT_COOKIE, "fruit=apple; colour=red");

Leave a Comment