Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Search In

Date and Time in PHP - Tutorial 7

This blog explains different functions used for date and time manipulation in PHP.

How to make custom session timeout in php

Hello Reader's!, If you want to make the custom php session which will destroy automatic then you can use the code as below:- session_start(); // ready to go! $now = time(); if (isset($_SESSION['discard_after']) && $now > $_SESSION['disc

Kohana issue on GoDaddy Shared Hosting

Recently while working for a project I faced an issue while making the site live. The site was developed with kohana framework and was to be hosted on Godaddy Server (Shared Hosting) and I faced a peculiar issue on the server giving me an error No

How to implement jquery Timeago with php?

Hello Reader's , We can see that posting & Online time changes frequently seconds ago, minutes ago and hours ago etc, In Social media. So Today in my blog I am going explain about timeago and its easy implementation with PHP. First, you nee

Time Difference between two timezones - Php

Many a times we need to take out time difference between two time zone using Date class in php. We can use the following code :- $timeZone = ['Any Timezone']; $default = date("Y-m-d h:i:s A");// UTC $dateTimeZone = new Dat

Date/Time Operations in php

Sometime there is a need to perform different operation on dates for ex: You may need to : 1) Add two dates/time 2) Subtract two dates/times for ex- to calculate your age by deducting your date of birth from current date. And many more. Yo

How to get current date time with you region using PHP

If you are using PHP and want to get the current date time with respect to your time zone then just use the code below :- $DateTime = new DateTime(null, new DateTimeZone('Asia/New Delhi')); $DateTime->setTimezone(new DateTimeZone('Asia/New Delhi

Time Zone Function in PHP

If your server is on a different location and you need a synchronization with it to get in the proper time. Then you need to get the correct time according to that specific location. To do so the timezone to the specific location. This can be done b

How to get current unix timestamp in PHP

Hello Reader's if you want to get the current time stamp of Unix in PHP, Then PHP offers your to use this by getTimestamp(). Now let's see this in the example below:- <?php $date = new DateTime(); echo $date->getTimestamp(); ?> Output:-

How to set session time out for fix time period in PHP

Hello Reader's, If you want to set session time out for fix time period in PHP use the below code. $page = $_SERVER['PHP_SELF']; $sec = "1"; header("Refresh: $sec; url=$page"); session_start(); $now = time(); if(!isset($_SESSION['start'])

prev 1 3 55
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: