Solved

good resource explaining how to set expiry times for php

Posted on 2006-11-14
2
217 Views
Last Modified: 2008-03-06
ive searched the major SE's and cant find a good site to explain how to set the expiry times for cookies or session in php?

im looking to destroy a cookie after 5 mins... but any examples ive found just do days...
0
Comment
Question by:ellandrd
2 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 17936816
See http://de3.php.net/setcookie
setcookie("TestCookie", $value, time()+5*60);

Testcookie wi expire after 5 minutes
For setting times of the php-session see
http://de3.php.net/manual/en/function.session-set-cookie-params.php
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17936836
thank you!
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question