April 20, 2012

Creating Self Expiring Alphanumeric Id In php

Question by Robert Lowery

I am creating a self expiring id, alphanumeric which can expire after a set time frame.
But i don’t know how to do it in php.

Answer by Starx

SET a timestamp with all the alphanumeric ID’s.

$id = array(id => 'id', "timeframe" => '23435476575');

Then check, when you need to.

if($id['timeframe'] < time()) {
   echo "expired";
}

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!