• 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

Laravel 5 issue with wherePivot

*** ERROR *** The PHP configuration loaded file is: c:/wamp64/bin/php/php8.1.0/php.ini - should be: c:/wamp64/bin/apache/apache2.4.53.1/bin/php.ini

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

Generate random username based on full name php

Sum array values

Why does codeigniter & Linux server throws unserialize() session data error when user tries to login

ORA-12546: TNS:permission denied error connection to remote oracle server

Accessors (Getter) & Mutators (Setter) On a Pivot Table in Laravel

Pass an image through AJAX [duplicate]

How to validate tin and cst using PHP?

Unable to get password for the instance created from AMI

Form repeater send wrong data with last element in Laravel

enroll_table three field fetch to payment form to create payment field in laravel 5.5

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

Combining a describing and one array with data

About Contact Privacy policy Terms and conditions