Download the PHP package natilosir/cookie without Composer

On this page you can find all versions of the php package natilosir/cookie. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cookie

PHP Cookie Manager

Overview

The PHP Cookie Manager is a simple and effective class for managing cookies in PHP applications. This class provides static methods to set, get, delete, and list cookies easily, allowing for straightforward cookie management without the need for instantiation.

Installation

To use the PHP Cookie Manager in your project, simply include the Cookie.php file in your project. You can also install it via Composer.

Usage

Setting a Cookie

To set a cookie, use the set method. You can specify the cookie name, value, and expiration time in days.

Getting a Cookie

To retrieve the value of a cookie, use the get method.

Deleting a Cookie

To delete a cookie, use the delete method.

Listing All Cookies

To list all cookies available in the current session, use the list method.

Methods

set($name, $value, $days = 0)

Sets a cookie with the specified name and value. If $days is greater than 0, the cookie will expire after the specified number of days.

get($name)

Retrieves the value of the cookie with the specified name. Returns null if the cookie does not exist.

delete($name)

Deletes the cookie with the specified name by setting its expiration date to a time in the past.

list()

Returns an associative array of all cookies currently available in the $_COOKIE superglobal.

Example

Here is a complete example demonstrating how to use the PHP Cookie Manager:


All versions of cookie with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package natilosir/cookie contains the following files

Loading the files please wait ...