set_cookie_for_url
set_cookie_for_url($url,$name,$cookie,$expires="",$domain="",$path="",$httpOnly=false,$secure=false,$session=false,$sameSite="",$priority=""); - set (add) cookies for the specified site
The input function accepts parameters:
$url – site address$name – the name of the cookie or "" if the next parameter is not many cookies$cookie – a string with cookies or cookies Since version 7.0.43 $expires , $domain , $path , $httpOnly ,
$secure to set additional parameters for cookies.
Since version 7.0.53 $sameSite and $priority have been added to set the corresponding cookie properties.
After testing, the function returns the result of its work to the script :
true – completed successfully
false – failed to execute