From Documentation
This chapter describes how to integrate ZK with other frameworks, including how to write a JSP/JSF tag with ZK components, how to access ZK components in foreign Ajax channel, how to work with form-based framework, and so on.
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']; ?>