• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_real_ip函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_real_ip函数的典型用法代码示例。如果您正苦于以下问题:PHP get_real_ip函数的具体用法?PHP get_real_ip怎么用?PHP get_real_ip使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_real_ip函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: insertUser

 public function insertUser($data)
 {
     $data["ctime"] = time();
     $data["ip"] = get_real_ip();
     $this->db->insert($this->database, $data);
     return $this->db->insert_id();
 }
开发者ID:utfqvfhpyygy,项目名称:kouyuyouban,代码行数:7,代码来源:UserModel.php


示例2: check_session

function check_session()
{
    if ($GLOBALS['use_ip_in_session'] == 1) {
        $ip = get_real_ip();
    } else {
        $ip = date('m');
    }
    @session_start();
    ini_set('session.cookie_httponly', TRUE);
    // use a cookie to remain logged in
    $user_id = hash_password($GLOBALS['mdp'] . $GLOBALS['identifiant'] . $GLOBALS['salt'], md5($_SERVER['HTTP_USER_AGENT'] . $ip . $GLOBALS['salt']));
    if (isset($_COOKIE['BT-admin-stay-logged']) and $_COOKIE['BT-admin-stay-logged'] == $user_id) {
        $_SESSION['user_id'] = md5($user_id);
        session_set_cookie_params(365 * 24 * 60 * 60);
        // set new expiration time to the browser
        session_regenerate_id(true);
        // Send cookie
        return TRUE;
    }
    if (!isset($_SESSION['user_id']) or $_SESSION['user_id'] != $GLOBALS['identifiant'] . $GLOBALS['mdp'] . md5($_SERVER['HTTP_USER_AGENT'] . $ip)) {
        return FALSE;
    } else {
        return TRUE;
    }
}
开发者ID:CamTosh,项目名称:blogotext,代码行数:25,代码来源:util.php


示例3: GetTracker

 function GetTracker($serverID = "")
 {
     $result = array();
     if (!empty($serverID)) {
         $sql = $this->_serverDB->QueryWithBinds("SELECT NAME, SKILLGAINRATE, ACTIONTIMER, MAXPLAYERS, MAXCREATURES, PERCENT_AGG_CREATURES, PVP, EPIC, MAPNAME FROM SERVERS WHERE SERVER = ?", array($serverID));
         $server = $sql->fetch(PDO::FETCH_ASSOC);
         $server["COUNT"] = $this->GetPlayerCount();
         $server["EXTERNALIP"] = get_real_ip();
         $result = $server;
     }
     return $result;
 }
开发者ID:dkraklan,项目名称:WurmUnlimitedAdmin,代码行数:12,代码来源:class.Server.inc.php


示例4: setLog

 function setLog($data, $_url)
 {
     $new_line = "\r\n";
     $str = "生成时间:" . date("Y-m-d H:i:s") . $new_line;
     $str .= "请求URL:" . $_url . $new_line;
     $str .= "返回数据:" . json_encode($data, JSON_UNESCAPED_UNICODE) . $new_line;
     $str .= "请求IP:" . get_real_ip() . $new_line;
     $str .= $new_line;
     $file_path = Config::get('logPath', '/logs/api_logs/');
     $file_path = rtrim($file_path, "/");
     $filename = $file_path . '/' . date('Ymd') . '/' . date("H") . ".log";
     _write_file($filename, $str);
 }
开发者ID:rainsj,项目名称:note,代码行数:13,代码来源:function.php


示例5: recaptcha_check_answer

 if ($txt_name == '' || $txt_email == '' || $txt_comments == '') {
     $err[] = "All fields are required to submit a review.";
 }
 /********************* RECAPTCHA CHECK *******************************
 	This code checks and validates recaptcha
 	****************************************************************/
 $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
 if (!$resp->is_valid) {
     $err[] = "Image Verification failed! (reCAPTCHA said: " . $resp->error . ")";
 }
 if (empty($err)) {
     $to = $a['emai'];
     //$to      = '"Ben Vigl [TEST MODE]" <[email protected]>';
     $subject = $a['name'] . ' has been reviewed on AtlantaOccasions.com';
     $headers = 'From: "Occasions Magazine" <[email protected]>' . "\r\n" . 'Reply-To: "Occasions Magazine" <[email protected]>' . "\r\n" . 'X-Mailer: AO3/PHP/' . phpversion();
     $msg = 'The following review of ' . $a['name'] . ' was submitted:' . "\r\n\r\n" . 'Name: ' . $txt_name . "\r\n" . 'Email: ' . $txt_email . "\r\n" . 'Rating: ' . $rdo_rating . "\r\n" . 'Review: ' . "\r\n\r\n" . $txt_comments . "\r\n\r\n\r\n" . '------------------------------------------------------------' . "\r\n" . 'SENT TO : ' . $a['emai'] . "\r\n" . 'SENT AT : ' . date("D F j, Y, g:i a") . "\r\n" . 'FROM IP : ' . get_real_ip() . "\r\n" . '------------------------------------------------------------' . "\r\n";
     mail($to, $subject, $msg, $headers);
     mail(AO_ADMIN_EMAIL, $subject, $msg, $headers);
     mail(AO_TECH_EMAIL, $subject, $msg, $headers);
     // all clear to save the data to the database
     $api = new PodAPI();
     // since we are saving a new profile, these fields need initializing this one time only
     $comment_data['vendor'] = $a['id'];
     $comment_data['name'] = $txt_name;
     $comment_data['email'] = $txt_email;
     $comment_data['rating'] = $rdo_rating;
     $comment_data['comment'] = $txt_comments;
     $comment_data['comment_date'] = date("Y-m-d H:i:s");
     // safety cleansing
     pods_sanitize($comment_data);
     $params = array('datatype' => 'comments', 'columns' => $comment_data);
开发者ID:heathervreeland,项目名称:Occasions-Online-WP-Theme,代码行数:31,代码来源:profile.20101023.php


示例6: oplog

 private function oplog($addContent)
 {
     if (empty($addContent)) {
         return false;
     }
     //操作日志记录
     $logAdd['app'] = $this->_application;
     $logAdd['controller'] = $this->_controller;
     $logAdd['action'] = $this->_action;
     $logAdd['content'] = json_encode($addContent);
     $logAdd['ip'] = get_real_ip();
     $logAdd['operat'] = UNAME;
     $this->operateLogModel->addOpLog($logAdd);
 }
开发者ID:spwx820,项目名称:lock-money-admin_cp,代码行数:14,代码来源:package.php


示例7: save_reply

 function save_reply()
 {
     if (!$this->setting->get_conf('system.enable_comment')) {
         form_ajax_failed('text', lang('album_comment_closed'));
     }
     $comment['email'] = safe_convert($this->getPost('email'));
     $comment['author'] = safe_convert($this->getPost('author'));
     $comment['content'] = safe_convert($this->getPost('content'));
     $comment['ref_id'] = intval($this->getPost('ref_id'));
     $comment['type'] = intval($this->getPost('type'));
     $comment['reply_author'] = safe_convert($this->getPost('reply_author'));
     $comment['pid'] = intval($this->getPost('pid'));
     $this->plugin->trigger('before_post_comment');
     if ($this->setting->get_conf('system.enable_comment_captcha') && !$this->user->loggedin()) {
         $captcha =& loader::lib('captcha');
         if (!$captcha->check($this->getPost('captcha'))) {
             form_ajax_failed('text', lang('invalid_captcha_code'));
         }
     }
     if ($comment['email'] && !check_email($comment['email'])) {
         form_ajax_failed('text', lang('error_email'));
     }
     if (!$comment['author']) {
         form_ajax_failed('text', lang('error_comment_author'));
     }
     if (!$comment['content']) {
         form_ajax_failed('text', lang('empty_content'));
     }
     if (!$comment['ref_id'] || !$comment['type'] || !$comment['pid'] || !$comment['reply_author']) {
         form_ajax_failed('text', lang('miss_argument'));
     }
     $comment['post_time'] = time();
     $comment['author_ip'] = get_real_ip();
     if ($this->setting->get_conf('system.comment_audit') == 1 && !$this->user->loggedin()) {
         $comment['status'] = 0;
     } else {
         $comment['status'] = 1;
     }
     if ($reply_id = $this->mdl_comment->save($comment)) {
         $comment['id'] = $reply_id;
         $this->output->set('info', $comment);
         $this->plugin->trigger('reply_comment', $reply_id);
         form_ajax_success('text', loader::view('comments/view', false));
     } else {
         form_ajax_failed('text', lang('reply_failed'));
     }
 }
开发者ID:vluo,项目名称:myPoto,代码行数:47,代码来源:comments.ctl.php


示例8: delAction

 public function delAction()
 {
     $midArr = daddslashes($this->postVar('mid', ''));
     if (!empty($midArr)) {
         $delArr = $delApiArr = array();
         foreach ($midArr as $key => $val) {
             $apiSendCallBack = '';
             $messageSet['id'] = $val;
             $messageSet['message_type'] = 1;
             // $messageSet['status'] = -1;
             $getMessage = $this->messageModel->getMessage($messageSet);
             if (intval($getMessage['status']) == 0) {
                 $re = $this->messageModel->deleteMessage($val);
             } else {
                 if (!empty($getMessage['callback_info']) && in_array(UID, array(1, 2, 3, 4, 5))) {
                     $re = $this->messageModel->deleteMessage($val);
                     if ($re) {
                         //删除发送成功的公共消息
                         $sendData['msgid'] = $getMessage['callback_info'];
                         $apiData = json_encode($sendData);
                         $apiData = urlencode($apiData);
                         $apiSendJsonRe = file_get_contents(_API_URL_ . "/admin_public_del_msg.do?data={$apiData}");
                         $apiSendRe = json_decode($apiSendJsonRe, true);
                         if (!empty($apiSendRe['data']['rs']) && 1 == $apiSendRe['data']['rs']) {
                             $apiSendCallBack = "succ";
                         } elseif (isset($apiSendRe['errcode']) && isset($apiSendRe['msg'])) {
                             $apiSendCallBack = $apiSendRe['msg'] . "/errcode_" . $apiSendRe['errcode'];
                         }
                         $delArr[$val] = $apiSendCallBack;
                     }
                 } else {
                     $timeInterval = 5 - intval(time() - strtotime($getMessage['createtime'])) / 60;
                     if ($timeInterval < 0) {
                         $timeInterval = 0;
                     }
                     $timeIntervalStr = strval($timeInterval);
                     echo "<script>if (confirm('暂时不能删除,请于审核通过后5分钟尝试,如果失败,请联系开发确认消息状态!'))\n                            location.href = '/admin/message/'; </script>";
                     //                    confirm("暂时不能删除" . "请于" . strval((time() - strtotime($getMessage['createtime'])) / 60) . "分钟后尝试!");
                 }
             }
         }
         if ($delArr) {
             $logAdd['app'] = $this->_application;
             $logAdd['controller'] = $this->_controller;
             $logAdd['action'] = $this->_action;
             $logAdd['content'] = json_encode($delArr);
             $logAdd['ip'] = get_real_ip();
             $logAdd['operat'] = UNAME;
             $this->operateLogModel->addOpLog($logAdd);
             $this->redirect('', '/admin/message/', 0);
         }
     }
     $this->redirect('', '/admin/message/', 0);
 }
开发者ID:spwx820,项目名称:lock-money-admin_cp,代码行数:54,代码来源:message.php


示例9: admin_msg

    $user = $_POST['user'];
    $pwd = $_POST['pwd'];
    //echo (md5($pwd));
    //$rememberme = $_POST['rememberme'] == '1' ? '1':'0';
    if ($user == '' || $pwd == '') {
        admin_msg('login.php', '错误提示:请填写用户名或密码!');
    }
    $result = $db->GetRow("SELECT * FROM mycms_admin_user WHERE (state is null or state !=-2) and username = '" . $user . "' AND password = '" . md5($pwd) . "'");
    if (!$result) {
        admin_msg('login.php', '错误提示:用户名或密码填写错误!');
    } else {
        //session_register("userInfo");
        $_SESSION['userInfo'] = null;
        $_SESSION["userInfo"] = base64_encode(serialize($result));
        //unserialize(base64_decode())
        $db->Execute('UPDATE mycms_admin_user SET lognum=lognum+1 WHERE uid=' . $result['uid']);
        //header('location:index.php');
        $db->Execute("INSERT INTO mycms_admin_log(uid,uname,ltime,lip) VALUES(" . $result['uid'] . ",'" . $result['username'] . "','" . date('Y-m-d h:i:s') . "','" . get_real_ip() . "')");
        header('location:index.php');
    }
} elseif (isset($_GET['action']) && $_GET['action'] == 'out') {
    session_destroy();
    header('location:login.php');
} else {
    if (isset($_GET["img"]) || isset($_GET["type"])) {
        $smarty->display('admin/login0.html');
    } else {
        $smarty->display('admin/login.html');
    }
}
$db->close();
开发者ID:liujidong,项目名称:nei,代码行数:31,代码来源:login.php


示例10: auditholdAction

 public function auditholdAction()
 {
     $payId = (int) $this->reqVar('pay_id', 0);
     $dosubmit = daddslashes($this->postVar('dosubmit', ''));
     $remark = daddslashes($this->postVar('remark', ''));
     $setTimeOut = 0;
     $exchangeRe = $this->exchangeModel->getExchange(array('id' => $payId));
     if (!empty($exchangeRe['id']) && !empty($exchangeRe['uid'])) {
         if (!empty($dosubmit)) {
             $exchangeHSet['exchange_id'] = $exchangeRe['id'];
             $isH = $this->exchangeHModel->getExchangeH($exchangeHSet);
             if ($isH) {
                 $this->exchangeHModel->saveExchangeH($exchangeRe['id'], $remark);
             } else {
                 $exchangeHAdd['exchange_id'] = $exchangeRe['id'];
                 $exchangeHAdd['remark'] = $remark;
                 $this->exchangeHModel->addExchangeH($exchangeHAdd);
             }
             //操作记录
             $logAdd['app'] = $this->_application;
             $logAdd['controller'] = $this->_controller;
             $logAdd['action'] = $this->_action;
             $logAdd['content'] = json_encode(array($payId => "暂缓"));
             $logAdd['ip'] = get_real_ip();
             $logAdd['operat'] = UNAME;
             $this->operateLogModel->addOpLog($logAdd);
             $setTimeOut = 1;
         }
     }
     $this->assign('setTimeOut', $setTimeOut);
     $this->assign('payId', $payId);
     $this->getViewer()->needLayout(false);
     $this->render('audit_hold');
 }
开发者ID:spwx820,项目名称:lock-money-admin_cp,代码行数:34,代码来源:audit.php


示例11: htmlspecialchars

    $txt_name = '';
    $txt_email = '';
    $txt_phone = '';
    $txt_best = '';
    $txt_comments = '';
    if ($_POST['submitted'] == "1") {
        $txt_name = htmlspecialchars($_POST['txt_name']);
        $txt_email = htmlspecialchars($_POST['txt_email']);
        $txt_phone = htmlspecialchars($_POST['txt_phone']);
        $txt_best = htmlspecialchars($_POST['txt_best']);
        $txt_comments = stripcslashes(htmlspecialchars($_POST['txt_comments'], ENT_NOQUOTES));
        $to = $a['emai'];
        //$to      = '"Ben Vigl [TEST MODE]" <[email protected]>';
        $subject = 'Found you on AtlantaOccasions.com and would like more information';
        $headers = 'From: "Occasions Magazine Contact Form" <[email protected]>' . "\r\n" . 'Reply-To: "Occasions Magazine" <[email protected]>' . "\r\n" . 'X-Mailer: AO3/PHP/' . phpversion();
        $msg = 'The following was sent from the Occasions Magazine Contact Form:' . "\r\n\r\n" . 'Name: ' . $txt_name . "\r\n" . 'Email: ' . $txt_email . "\r\n" . 'Phone: ' . $txt_phone . "\r\n" . 'Best Time to Contact: ' . $txt_best . "\r\n" . 'Comment/Details: ' . "\r\n\r\n" . $txt_comments . "\r\n\r\n\r\n" . '------------------------------------------------------------' . "\r\n" . 'SENT TO : ' . $a['emai'] . "\r\n" . 'SENT AT : ' . date("D F j, Y, g:i a") . "\r\n" . 'FROM IP : ' . get_real_ip() . "\r\n" . '------------------------------------------------------------' . "\r\n";
        mail($to, $subject, $msg, $headers);
        mail(AO_ADMIN_EMAIL, $subject, $msg, $headers);
        mail(AO_TECH_EMAIL, $subject, $msg, $headers);
        echo <<<HEREDOC
\t<h3>Thank you!</h3>
\t<p>Your email has been sent to {$a['name']}.</p>
\t<p>If you do not receive a response within 24 hours, we suggest giving them a quick call to make sure your email was delivered successfully.</p>
HEREDOC;
    } else {
        echo <<<HEREDOC
\t<p>To contact this business, please fill out the email form below and click "Send Email" and it will be delivered to the appropriate contact person at <b>{$a['name']}</b> immediately. Please provide as much information as possible to ensure a timely response.</p>
\t<form action="./" method="post">
\t\t<div class="pro_contactrow">
\t\t\t<div class="pro_contactlabel"><label for="txt_name">Name:</label></div>
\t\t\t<div class="pro_contacttxt"><input name="txt_name" type="text" size="50" id="txt_name" value="{$txt_name}" /></div>
开发者ID:heathervreeland,项目名称:Occasions-Online-WP-Theme,代码行数:31,代码来源:profile.20100929.php


示例12: delAction

 public function delAction()
 {
     $cidArr = daddslashes($this->postVar('cid', ''));
     if (!empty($cidArr)) {
         $delArr = array();
         foreach ($cidArr as $key => $val) {
             $re = $this->channelIncomeSetModel->deleteCICS($val);
             if ($re) {
                 $delArr[] = $val;
             }
         }
         if ($delArr) {
             $logAdd['app'] = $this->_application;
             $logAdd['controller'] = $this->_controller;
             $logAdd['action'] = $this->_action;
             $logAdd['content'] = json_encode($delArr);
             $logAdd['ip'] = get_real_ip();
             $logAdd['operat'] = UNAME;
             $this->operateLogModel->addOpLog($logAdd);
         }
     }
     $this->redirect('', '/admin/channel_income/', 0);
 }
开发者ID:spwx820,项目名称:lock-money-admin_cp,代码行数:23,代码来源:channel_income.php


示例13: login

 /**
  * 登录
  */
 public function login($email, $password)
 {
     $model = $this->getUserByMail($email);
     if (!$model) {
         return false;
     }
     $this->salt = $model['salt'];
     $this->password = $model['password'];
     if (!$this->validatePassword($password)) {
         return false;
     }
     $getRealIp = get_real_ip();
     $obj = null;
     if ($this->save(array('id' => $model['id'], 'login_ip' => $getRealIp, 'last_time' => date('Y-m-d H:i:s')))) {
         $uinfo = $this->encrypt(array('uid' => $model['id'], 'uname' => $model['truename'], 'last' => $model['last_time']));
         $ukey = md5($uinfo . self::IHOUSE_KEY);
         $now = time() + self::COOKIE_EXPIRED;
         $host = $_SERVER['HTTP_HOST'];
         $obj = setcookie(self::UINFO, $uinfo, $now, '/', $host) && setcookie(self::UKEY, $ukey, $now, '/', $host) ? $this : null;
         if ($obj) {
             $this->uid = $model['id'];
             $this->uname = $model['truename'];
             $this->is_pause = $model['is_pause'];
             $this->last_time = $model['last_time'];
         }
     }
     return $obj;
 }
开发者ID:spwx820,项目名称:lock-money-admin_cp,代码行数:31,代码来源:admin.php


示例14: htmlspecialchars

$txt_name = htmlspecialchars($_POST['txt_name']);
$txt_email = htmlspecialchars($_POST['txt_email']);
$txt_phone = htmlspecialchars($_POST['txt_phone']);
$txt_message = stripcslashes(htmlspecialchars($_POST['txt_message'], ENT_NOQUOTES));
if ($txt_name && $txt_email && $txt_phone && $txt_message) {
    $profile = new Pod('vendor_profiles');
    $profile->findRecords('id', -1, "t.id = '{$pid}'");
    //$profile->findRecords( 'id', $pid);
    $total = $profile->getTotalRows();
    if ($total > 0) {
        $profile->fetchRecord();
        $a = get_vendorfields($profile);
        $to = $a['emai'];
        $subject = 'Found you on OccasionsOnline.com Mobile (' . $txt_name . ')';
        $headers = 'From: "Occasions Magazine Contact Form" <[email protected]>' . "\r\n" . 'Reply-To: "Occasions Magazine" <[email protected]>' . "\r\n" . 'X-Mailer: AO5/PHP/' . phpversion();
        $msg = 'The following was sent from the Occasions Magazine Mobile Contact Form:' . "\r\n\r\n" . 'Name: ' . $txt_name . "\r\n" . 'Email: ' . $txt_email . "\r\n" . 'Phone: ' . $txt_phone . "\r\n" . 'Message: ' . "\r\n\r\n" . $txt_message . "\r\n\r\n\r\n" . '------------------------------------------------------------' . "\r\n" . 'SENT TO : ' . $a['name'] . "\r\n" . 'CONTACT : ' . $a['emai'] . "\r\n" . 'SENT AT : ' . date("D F j, Y, g:i a") . "\r\n" . 'FROM IP : ' . get_real_ip() . "\r\n" . '------------------------------------------------------------' . "\r\n";
        mail($to, $subject, $msg, $headers, AO_EMAIL_FLAGS);
        mail(AO_ADMIN_EMAIL, $subject, $msg, $headers, AO_EMAIL_FLAGS);
        mail(AO_TECH_EMAIL, $subject, $msg, $headers, AO_EMAIL_FLAGS);
        $success = true;
    } else {
        $err_msg = "There was an error locating contact information for this vendor. We are sorry for the inconvenience.";
        $err_title = "We Encountered a Problem";
    }
} else {
    $err_msg = "Please be sure to fill in all fields.";
    $err_title = "Almost there...";
}
if ($success) {
    ?>
<div data-role="page" id="contact_results" data-theme="o">
开发者ID:heathervreeland,项目名称:Occasions-Online-WP-Theme,代码行数:31,代码来源:profile_mobile_phone.php


示例15: Save

 function Save()
 {
     if (!$this->GetAllowed('EDIT')) {
         return;
     }
     if ($this->CheckExistment()) {
         return;
     }
     $arr = $this->dataset->GetFieldValues(true);
     $arr['timestamp'] = time();
     $arr['user_id'] = "'" . user_id() . "'";
     $arr['ip'] = "'" . get_real_ip() . "'";
     db_insert($this->settings['content'], $arr);
 }
开发者ID:Nazg-Gul,项目名称:gate,代码行数:14,代码来源:01CCList.php


示例16: Rollback

 function Rollback($id)
 {
     if (!$this->GetAllowed('EDITINFO')) {
         return;
     }
     $r = db_row(db_select($this->settings['content'], array('id')));
     $nid = db_next_field($this->settings['content'], 'id');
     db_update($this->settings['content'], array('id' => $nid, 'timestamp' => time(), 'ip' => '"' . get_real_ip() . '"', 'user_id' => user_id()), '`id`=' . $id);
 }
开发者ID:Nazg-Gul,项目名称:gate,代码行数:9,代码来源:02CCPublication.php


示例17: exception_delAction

 public function exception_delAction()
 {
     $uidArr = daddslashes($this->postVar('uid', ''));
     if (!empty($uidArr)) {
         $delArr = array();
         foreach ($uidArr as $key => $val) {
             $re = $this->inviteHoldExceptionModel->deleteInviteHoldException($val);
             if ($re) {
                 $delArr[] = $val;
             }
         }
         if ($delArr) {
             $logAdd['app'] = $this->_application;
             $logAdd['controller'] = $this->_controller;
             $logAdd['action'] = $this->_action;
             $logAdd['content'] = json_encode($delArr);
             $logAdd['ip'] = get_real_ip();
             $logAdd['operat'] = UNAME;
             $this->operateLogModel->addOpLog($logAdd);
         }
     }
     $this->redirect('', '/admin/invite_hold/exception', 0);
 }
开发者ID:spwx820,项目名称:lock-money-admin_cp,代码行数:23,代码来源:invite_hold.php


示例18: get_caller_id

function get_caller_id()
{
    if (isset($_SESSION['FSEInfo'])) {
        $caller_id = $_SESSION['FSEInfo']['fse_id'];
    } else {
        if (session_id() != '') {
            $caller_id = md5(session_id());
        } else {
            $client_ip = get_real_ip();
            $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'unknown';
            $caller_id = md5("{$client_ip}-{$user_agent}");
        }
    }
    return $caller_id;
}
开发者ID:rratcliffe,项目名称:fsen,代码行数:15,代码来源:misc.php


示例19: BuildDBArrayFromDataset

 function BuildDBArrayFromDataset($dataset, $pid, $uid, $order)
 {
     $arr = $dataset->GetFieldValues(true);
     $arr['timestamp'] = time();
     $arr['user_id'] = user_id();
     $arr['ip'] = db_string(get_real_ip());
     $arr['pid'] = $pid;
     $arr['uid'] = $uid;
     $arr['order'] = $order;
     return $arr;
 }
开发者ID:Nazg-Gul,项目名称:e-marsa,代码行数:11,代码来源:03Catalogue.php


示例20: get_real_ip

<?php

echo get_real_ip();
function get_real_ip()
{
    if (isset($_SERVER["HTTP_CLIENT_IP"])) {
        return $_SERVER["HTTP_CLIENT_IP"];
    } elseif (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
        return $_SERVER["HTTP_X_FORWARDED_FOR"];
    } elseif (isset($_SERVER["HTTP_X_FORWARDED"])) {
        return $_SERVER["HTTP_X_FORWARDED"];
    } elseif (isset($_SERVER["HTTP_FORWARDED_FOR"])) {
        return $_SERVER["HTTP_FORWARDED_FOR"];
    } elseif (isset($_SERVER["HTTP_FORWARDED"])) {
        return $_SERVER["HTTP_FORWARDED"];
    } else {
        return $_SERVER["REMOTE_ADDR"];
    }
}
开发者ID:HostOnNet,项目名称:iptools,代码行数:19,代码来源:ipv4.php



注:本文中的get_real_ip函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_real_path函数代码示例发布时间:2022-05-15
下一篇:
PHP get_real_interface函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap