• 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

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

CSV to PHP class properties

how to insert data into select2 search input after scan using qrcode

Saving Data from form to database using AngularJS and php

Chunk and transpose a flat array into rows with a specific number of columns

Mobile browsers are adding .html to filename on download

laravel 5.6 bulk inserting json data

Call to undefined function openssl_decrypt

How to show selected value using javascript in laravel

advanced custom fields wordpress custom class

Sum array values

Laravel Carbon throws error The format separator does not match

Hide specific products from unlogged users based in product category in WooCommerce

Using if(isset($_POST['submit'])) to not display echo when script is open is not working

Redis Command To Sort Keys

About Contact Privacy policy Terms and conditions