Code to display visitors IP address on website

get_ip_list below is a function that you must call in order to get something. function get_ip_list() { $tmp = array(); if (isset($_SERVER[‘HTTP_X_FORWARDED_FOR’]) && strpos($_SERVER[‘HTTP_X_FORWARDED_FOR’],’,’)) { $tmp += explode(‘,’,$_SERVER[‘HTTP_X_FORWARDED_FOR’]); } elseif (isset($_SERVER[‘HTTP_X_FORWARDED_FOR’])) { $tmp[] = $_SERVER[‘HTTP_X_FORWARDED_FOR’]; } $tmp[] = $_SERVER[‘REMOTE_ADDR’]; return… Read moreCode to display visitors IP address on website

Redirect by PC or mobile access

php code as follows: $iswap = isset($_SERVER[‘HTTP_ACCEPT’])? $_SERVER[‘HTTP_ACCEPT’]:”; if(strpos($iswap,”wap”)>0) { @header(“Location: /wap/”); }