[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=? AND DATE_ADD(blocked_at, INTERVAL 1 HOURS) >= NOW()”; if(get_result($sql, $ip_address)) { // this address is blocked … Read more

[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 037014000245 SNL1090 747599617003 SNL1079 024182001822 SNL1102 745158300519 SNL1077 024182001891 SNL1148 039978003645 SNL1110 070670005759 SNL1083 037014000290 … Read more

[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()) + “https://stackoverflow.com/” + getZero(d.getMonth() + 1) + “https://stackoverflow.com/” + d.getFullYear(); $(this).html(newDateFormat); }); And here is the output: 2 solved … Read more