if (!empty($_SERVER['HTTP_CLIENT_IP']))
$ip=$_SERVER['HTTP_CLIENT_IP'];
else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
else
$ip=$_SERVER['REMOTE_ADDR'];
?>
Introduction HTML5 specification introduces new History API: history object can use pushState() to push given data onto the session history and change the URL to a given one, if provided. When history changes, browser will fire an onpopstate event to window.onpopstate. History management with HTML5 History API in ZK introduces how developers can use this […]
According to HTML5 page visibility API, it is useful to develop power efficient web applications. Here is an excellent demo written by Sam Dutton. In the upcoming ZK 6.5.1, we implemented this API with onVisibilityChange event which is easy to use. Here is a very simple sample: if (!event.isHidden()) lbl.setValue(“Welcome back”); We can also use […]