Month January 2016

[Solved] how can i make a countdown timer that goes past the 60minutes

The current minute is never an issue. You are concerned with the duration since last blocked, not with “what time was that”: block_user.php: <?php $now = new DateTime(); write_block_into_database($ip_address, $now->format(‘Y-m-d H:i:s’)); ?> check_block.php <?php $sql=”SELECT 1 FROM sometable WHERE ip_address=?…

[Solved] Getting Issue in Parsing String Using PHP

Assuming the following variable $string contains your sample json string. Decode using json decode and iterate over the inner Products array. $json = json_decode($string); foreach($json->Products as $product){ print $product->IXOneId . ‘ ‘ . $product->UPC12 . PHP_EOL; } Will output SNL1080…

[Solved] Edit date/time string via Javascript/jQuery

You can follow this code: HTML <div class=”date-string”>2016-01-14T10:30:37+02:00</div> <div class=”date-string”>2013-02-16T10:30:37+02:00</div> <div class=”date-string”>2017-03-15T10:30:37+02:00</div> JavaScript var d, newDateFormat; function getZero(number){ if(number < 10) return ‘0’ + number; return number; } $(‘.date-string’).each(function(){ d = new Date($(this).html()); newDateFormat = getZero(d.getDate()) + “” + getZero(d.getMonth()…