Execute Javascript code on browser back button

| By Webner

Here is sample code to trap browser back button and execute Javascript code on this event: jQuery(document).ready(function($) { if (window.history && window.history.pushState) { $(window).on(‘popstate’, function() {//when back is clicked popstate event executes //code here will execute on back click });

PHP – Get files modified on a particular date

| By Webner

Solution: In following example we have filtered files which are modified on current date (today’s date): $source= “C:\wamp\www\Files\”; $files = scandir($source); $archiveFiles = array(); foreach($files as $file) { if (!in_array($file,array(“.”,”..”))) { $lastModified = date(‘d/m/y’,filemtime($source . ‘/’ .$file)); IF($lastModified==date(“d/m/y”)) { array_push($archiveFiles, $file);