PHP code example of jondotsoy / cookieconverter

1. Go to this page and download the library: Download jondotsoy/cookieconverter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jondotsoy / cookieconverter example snippets


 
$cookie = new \cookieConverter\cookie();

$cookie->cookies["SSID"] = "aBsdCDp"; 
$cookie->cookies["USER"] = "userA"; 

// SSID=aBsdCDp; USER=userA
echo $cookie;

 
$cookie = new \cookieConverter\cookie("Lp=AAA; Expires=Wed, 13 Jan 2021 22:23:01 GMT");

// AAA
echo $cookie->cookies['Lp'];

// 1610576581
echo $cookie->expires;