• 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

how do i retrieve and display the alt text of an image in wordpress?

Laravel Passport - Not able to get token string in response?

How to update array value in Laravel

Testing subscription renewals on Stripe

WordPress - Dynamically add user ID to the end of a URL

Composer Script echo

get data-value with variable value

Get sum of arrays inside array

How can i hide dt if dd got empty value

Google Calendar API batch request PHP

Call to a member function fetch_field() on a non-object MySQLiDB

Getting values for an enum?

Select option from dropdown menu with PHP and mySql

RuntimeException: Unable to create the cache directory (/var/www/sonata/app/cache/dev)

how to remove %20 in the url in php

About Contact Privacy policy Terms and conditions