当前位置: 首页>>代码示例>>PHP>>正文


PHP ShopFunctions::getClientIP方法代码示例

本文整理汇总了PHP中ShopFunctions::getClientIP方法的典型用法代码示例。如果您正苦于以下问题:PHP ShopFunctions::getClientIP方法的具体用法?PHP ShopFunctions::getClientIP怎么用?PHP ShopFunctions::getClientIP使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ShopFunctions的用法示例。


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

示例1: checkIps

 private function checkIps()
 {
     if (!class_exists('ShopFunctions')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'shopfunctions.php';
     }
     $paybox_ips = array('194.2.122.158', '195.25.7.166', '195.101.99.76');
     $clientIp = ShopFunctions::getClientIP();
     if (!in_array($clientIp, $paybox_ips)) {
         $text = "Error with REMOTE IP ADDRESS = " . $clientIp . ".\n                        The remote address of the script posting to this notify script does not match a valid Paybox IP address\n\n            These are the valid Paybox IP Addresses: " . implode(",", $paybox_ips);
         $this->plugin->debugLog('FUNCTION checkIps' . $text, 'error');
         return false;
     }
     return true;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:14,代码来源:paybox.php

示例2: isValidIP

 /**
  * Switch for enabling / disabling Hidden Button Mode.
  * @return bool
  */
 private function isValidIP()
 {
     if (empty($this->_currentMethod->ip_whitelist)) {
         return true;
     }
     if (!class_exists('ShopFunctions')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'shopfunctions.php';
     }
     $clientIp = ShopFunctions::getClientIP();
     $ip_whitelist = explode(";", $this->_currentMethod->ip_whitelist);
     if (in_array($clientIp, $ip_whitelist)) {
         return true;
     }
     return false;
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:19,代码来源:amazon.php

示例3: getRemoteIPAddress

 function getRemoteIPAddress()
 {
     if (!class_exists('ShopFunctions')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'shopfunctions.php';
     }
     return ShopFunctions::getClientIP();
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:7,代码来源:paypal.php

示例4: _setBillingInformation

 function _setBillingInformation($usrBT)
 {
     if (!class_exists('ShopFunctions')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'shopfunctions.php';
     }
     $clientIp = ShopFunctions::getClientIP();
     // Customer Name and Billing Address
     return array('x_email' => isset($usrBT->email) ? $this->_getField($usrBT->email, 100) : '', 'x_first_name' => isset($usrBT->first_name) ? $this->_getField($usrBT->first_name, 50) : '', 'x_last_name' => isset($usrBT->last_name) ? $this->_getField($usrBT->last_name, 50) : '', 'x_company' => isset($usrBT->company) ? $this->_getField($usrBT->company, 50) : '', 'x_address' => isset($usrBT->address_1) ? $this->_getField($usrBT->address_1, 60) : '', 'x_city' => isset($usrBT->city) ? $this->_getField($usrBT->city, 40) : '', 'x_zip' => isset($usrBT->zip) ? $this->_getField($usrBT->zip, 20) : '', 'x_state' => isset($usrBT->virtuemart_state_id) ? $this->_getField(ShopFunctions::getStateByID($usrBT->virtuemart_state_id), 40) : '', 'x_country' => isset($usrBT->virtuemart_country_id) ? $this->_getField(ShopFunctions::getCountryByID($usrBT->virtuemart_country_id), 60) : '', 'x_phone' => isset($usrBT->phone_1) ? $this->_getField($usrBT->phone_1, 25) : '', 'x_fax' => isset($usrBT->fax) ? $this->_getField($usrBT->fax, 25) : '', 'x_customer_ip' => $clientIp);
 }
开发者ID:ForAEdesWeb,项目名称:AEW9,代码行数:9,代码来源:authorizenet.php


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