當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。