PHP Classes

How Can PHP Store Cookie Values in Files using the Package Netscape Cookie: Store and retrieve cookie values in Netscape files

Recommend this page to a friend!
  Info   View files Documentation   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 20 All time: 11,227 This week: 206Up
Version License PHP version Categories
netscape-cookie 1.0.0MIT/X Consortium ...5HTTP, PHP 5


This package can store and retrieve cookie values in Netscape files.

It provides one class that can create cookies to store cookie parameters and set and get their values.

Another class can save the cookie values in a text file in Netscape format.

Picture of Mateo
  Performance   Level  
Name: Mateo <contact>
Classes: 23 packages by
Country: Peru Peru
Age: ???
All time rank: 20694 in Peru Peru
Week rank: 72 Up1 in Peru Peru Up
Innovation award
Innovation award
Nominee: 10x

Winner: 3x


Netscape Cookies


composer require mateodioev/netscape-cookie


use Mateodioev\NetscapeCookie\{Config, Cookie, FileHandler};

$cookieJar = new FileHandler((new Config)
  ->setDir(__DIR__.'/cookies', true)

  ->add(Cookie::create('', true, '/', true, 0, 'test', 'test'))
  ->add(Cookie::create('', true, '/', true, time() + 3600, 'test1', 'test2')


# Netscape HTTP Cookie File
# File generate by	TRUE	/	TRUE	0	test	test	TRUE	/	TRUE	1666764937	test1	test2

  Files folder image Files  
File Role Description
Files folder imagesrc (3 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file readme.MD Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file Config.php Class Class source
  Plain text file Cookie.php Class Class source
  Plain text file FileHandler.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:11,227
This week:206Up