• 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

Insert multidimensional array to codeigniter cart

Override default Auth routes in Laravel 7

Custom Button next to “ADD TO CART” button of WooCommerce based on Product Type

Transpose multidimensional array and join values with commas

Add and update products to session cart in Laravel

PHP - installing Xdebug on Mac with XAMPP (Unix File)

Add a custom text for a particular product on specific email notification in Woocommerce

How to reset Laravel AuthManager/guards in between API calls in tests?

Getting public posts of a random user from Facebook API

generating a random code in php?

PHP - CURL using HTTPS [closed]

Get sum of arrays inside array

how to display a view on laravel 8 and not have a 404 NOT FOUND page?

add_action() function in wordpress not working [duplicate]

How to remove index.php and index from the URL using htaccess | PHP

About Contact Privacy policy Terms and conditions