• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

How to create a cookie to store the timestamp of when a page is first loaded with php

phpcookiestimestamp


PHP Snippet 1:

if (!isset($_COOKIE['load_date'])) {
    setcookie('load_date', time(), time() + 86400*365);
}

Related Snippets

User pool client {id}does not exist

How to use PHPCBF to fix one issue at a time?

How do I pass the dynamic output of a php variable or php function to a CSS variable?

How can I stop a symfony process which is listening on http://127.0.0.1:8000

How to load Codeigniter 4 lang file into an array variable

Add rows to Single product Additional information table in WooCommerce 3.6

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

how to identify the web server name of remote host

Remove "estimated for {country}" text after tax amount in Woocommerce checkout page

Make Shipping Method fields Mandatory on Woocommerce checkout page

Composer Warning: openssl extension is missing. How to enable in WAMP

Detect a fetch request in PHP

I'm trying to write a clean url for my website using the $_SERVER['REQUEST_URI'] in php

Laravel lang slug in url

Display the default discounted price and percentage on Woocommerce products

About Contact Privacy policy Terms and conditions