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


PHP MAX_remotehostSetGeoInfo函数代码示例

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


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

示例1: MAX_remotehostSetInfo

/**
 * Wrapper function to set all remotehost information, by default this will execute if the invocationType is
 * not set to "xml-rpc" (xml-rpc calls this after re-populating the $_SERVER array)
 *
 * @param boolean $run Ignore invocationType checking?
 */
function MAX_remotehostSetInfo($run = false)
{
    if (empty($GLOBALS['_OA']['invocationType']) || $run || $GLOBALS['_OA']['invocationType'] != 'xmlrpc') {
        MAX_remotehostProxyLookup();
        MAX_remotehostReverseLookup();
        //MAX_remotehostSetClientInfo();  // now moved into plugin
        MAX_remotehostSetGeoInfo();
    }
}
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:15,代码来源:remotehost.php

示例2: test_MAX_remotehostSetGeoInfo

 /**
  * @todo concerns a plugin
  *
  * A function to set the viewer's geotargeting information in the
  * $GLOBALS['_MAX']['CLIENT_GEO'] global variable, if a plugin for
  * geotargeting information is configured.
  *
  * @todo This is a workaround to avoid having to include the entire plugin architecure
  *       just to be able to load the config information. The plugin system should be
  *       refactored to allow the Delivery Engine to load the information independently
  */
 function test_MAX_remotehostSetGeoInfo()
 {
     $return = MAX_remotehostSetGeoInfo();
     $this->assertTrue(true);
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:16,代码来源:remotehost.del.test.php

示例3: MAX_remotehostProxyLookup

| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/
require_once MAX_PATH . '/lib/OA/Dal.php';
require_once MAX_PATH . '/www/admin/lib-banner.inc.php';
require_once LIB_PATH . '/Plugin/Component.php';
require_once MAX_PATH . '/lib/max/Dal/Admin/Acls.php';
if (!isset($GLOBALS['_MAX']['FILES']['/lib/max/Delivery/remotehost.php'])) {
    // Required by PHP5.1.2
    require_once MAX_PATH . '/lib/max/Delivery/remotehost.php';
}
// Initialize the client info to enable client targeting options
MAX_remotehostProxyLookup();
MAX_remotehostReverseLookup();
//MAX_remotehostSetClientInfo();  // moved to plugin
MAX_remotehostSetGeoInfo();
/**
 * @todo I believe the following is unnecessary with the "MAX_remotehostSetGeoInfo()" above
 * However the isAllowed() methods for the Geo-Plugins will have to be updated
 */
// Register the geotargeting information if necessary
if (!isset($GLOBALS['_MAX']['GEO_DATA']) && (!empty($conf['geotargeting']['type']) && $conf['geotargeting']['type'] != 'none')) {
    $oGeoComponent = OX_Component::factoryByComponentIdentifier($conf['geotargeting']['type']);
    // Get geotargeting info
    if ($oGeoComponent) {
        // Set the geotargeting IP to the fixed test address
        // (IP Address used to determine which (if any) MaxMind databases are installed)
        $GLOBALS['_MAX']['GEO_IP'] = '24.24.24.24';
        // Get the geotargeting config
        $geoTargetingType = $oGeoPlugin->name;
        // Look up the Geotargeting data
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:lib-acl.inc.php


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