PHP User::getUserIP Examples

PHP User::getUserIP - 2 examples found. These are the top rated real world PHP examples of User::getUserIP extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
 public function saveVote(&$data)
 {
     self::$dbh->query('INSERT INTO poll_vote (opt_id, ip, user_agent, poll_id, sess_id, vote_on) VALUES (?, INET_ATON(?), ?, ?, ?, ?)', array($data['opt'], User::getUserIP(), $_SERVER['HTTP_USER_AGENT'], $data['id'], session_id(), $_SERVER['REQUEST_TIME']));
     $cookie = 'poll' . $data['id'];
     setcookie($cookie, $_SERVER['REQUEST_TIME'], $expire, '/');
     unset($_SESSION['vote']);
 }
Example #2
0
 public function info()
 {
     return User::getUserIP() . '<br/>' . $_SERVER['HTTP_USER_AGENT'];
 }