Idle User Logout

Hi this post is for implementing idle user logout. I have written it using wordpress db object. Because wordpress is based on cookies and default expiry time is 2 weeks. But wordpress does not provide any intuit functionality for logging…

Comparing and finding matched elements from an array

Often it comes to requirement when we need to compare and return matched set of values from an array. Exm: Suppose we have an array like $array=array(‘audios/2015/01/audio_54c74d9d8b2bf__pd.m4a’, ‘audios/2015/01/audio_54c74d9d8b47e__pd.m4a’, ‘videos/2015/01/videos_54c75416c186d__pd.mp4’, ‘images/image_55c2fef42332.jpg’, ‘images/image_tt.jpg’, ‘videos/video_tt.jpg’ ) WE want to find images that start…

Create and Get Cookie in Javascript/PHP

Creating Cookie in Javascript <script type=”text/javascript”> //create cookie function function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = “expires=”+d.toUTCString(); document.cookie = cname + “=” + cvalue + “; ” + expires + “;…

Page 1 of 3123