Category Archives: PHP

1,268 views

PHP get daylight saving time

$dst = date("I"); //I (capital i); 0 or 1 if daylight saving time   // example: $hour = 14; if(date("I")===1){ $hour = $hour + 1; } // OR $hour = 14 + date("I");

Posted in PHP | Tagged | Comments Off on PHP get daylight saving time
1,277 views

Access-Control-Allow-Origin Multiple Origin Domains

In browser’s console get message: no ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin is therefore not allowed access. PHP source code: put into start of php script // different DOMAINS $http_origin = $_SERVER[’HTTP_ORIGIN’];   if ($http_origin == "http://www.domain1.com" … Continue reading

Posted in PHP | Tagged , | Comments Off on Access-Control-Allow-Origin Multiple Origin Domains