Category: Web Development Tips

Get current URL in PHP 0

Get current URL in PHP

Sometime, you need to get a current page URL that is shown in the browser address bar. Here is a small code to get the current url. $url = (!empty($_SERVER[‘HTTPS’])) ? “https://”.$_SERVER[‘SERVER_NAME’] .$_SERVER[‘REQUEST_URI’] :...

Calculate week in PHP 0

Calculate week in PHP

Use this script to calculate a week in PHP <?php $date = mktime(0, 0, 0, 01,27, 2011); $week = (int)date(‘W’, $date); ?>

How to check date if date is between two date 0

How to check date if date is between two date

This function the return the true and false if date is exist or not exist. function dateWithin(StartDate,EndDate,CheckDate) { var b,e,c; s = Date.parse(StartDate); e = Date.parse(EndDate); c = Date.parse(CheckDate); if((c <= e && c...

How to disable auto save, post revision and reduce the database size in wordpress 0

How to disable auto save, post revision and reduce the database size in wordpress

The auto save option in wordpress is a best feature but not for every. For those who have limited web space, limited database size and they not want to auto save or post revision...

How to fetch current date and time using Javascript 0

How to fetch current date and time using Javascript

JavaScript Current Time Clock With the newly created Date Object we can show the current date and time, now only a variable which store the current date and time. We have to only print...

Force download using PHP 0

Force download using PHP

A force-download script can give you more control over a file download than you would have providing a direct link. Using a force-download script, you can: Download image file Download pdf, flash, mp3 etc....