• 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

array_map triple dimensional array [duplicate]

Can we define variables in `.tpl` files?

PHP Sorting - getting 10, 11, 12 ... 1, 20, 2 rather than 1, 10, 11, 12 ... 2, 20

Transpose multidimensional array and join values with commas

GuzzleHttp Hangs When Using Localhost

How to create laravel storage symbolic link for production or sub domain system?

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error

PHP Form Not Inserting

How to use $this->session->set_userdata in codeigniter

Telegram bot doesn't answer

Codeigniter, Severity: error --> Exception: Too few arguments to function, admin dashboard shows HTTP error 500

Uploading video to Youtube using Youtube Data API V3 and Google API Client PHP -- getting 401 (unauthorized) message

Laravel multi auth - Authentication user provider [] is not defined

Laravel 8: Array to string conversion while calling route:list

laravel 5.6 bulk inserting json data

About Contact Privacy policy Terms and conditions