承接 commandstring/cookies 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

commandstring/cookies

最新稳定版本:v6.0.0

Composer 安装命令:

composer require commandstring/cookies

包简介

A simpler way to manipulate cookies in PHP

README 文档

README

Install with Composer using composer require commandstring/cookies

Requirements

  • PHP >=8.0
  • Basic understanding of PHP OOP
  • Composer 2

Basic Usage

require  __DIR__."/vendor/autoload.php";
use CommandString\Cookies\Cookie;

$cookies = new Cookie();

#                              v hours 
#                              v valid   v seconds valid
$cookies->set("name", "value", 168, 10, 30); // by default cookies expire in a week
#                                   ^ minutes valid

// After page refresh //
echo $cookies->get("name"); // output: value

// Delete cookie //
$cookie->delete("name"); // remove the cookie

// Delete all cookies
$cookie->deleteAll();

// Check if a cookie exists
$cookie->exists("name"); // returns bool

Using CommandString/Encrypt with CommandString/Cookies

I recommend checking out the README for CommandString/Encrypt

use CommandString\CookieEncryption\CookieEncryption;
use CommandString\Cookies\Cookie;

// use the cookieEncryption class that wraps around cmdstr/encrypt/encryption class
$cookies = new Cookie(new CookieEncryption("MZCdg02STLzrsj05KE3SIL62SSlh2Ij", "AES-256-CTR"));
// ... now cmdstr/encrypt will handle encrypting cookies

统计信息

  • 总下载量: 52
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固