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


PHP MAX_sendStatusCode函数代码示例

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


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

示例1: MAX_imageServe

/**
 * @package    MaxDelivery
 * @subpackage image
 *
 * This library defines functions that need to be available to
 * the ai delivery script
 *
 */
function MAX_imageServe($aCreative, $filename, $contenttype)
{
    // Check if the browser sent a If-Modified-Since header and if the image was
    // modified since that date
    if (!isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) || $aCreative['t_stamp'] > strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
        MAX_header("Last-Modified: " . gmdate('D, d M Y H:i:s', $aCreative['t_stamp']) . ' GMT');
        if (isset($contenttype) && $contenttype != '') {
            switch ($contenttype) {
                case 'swf':
                    MAX_header('Content-type: application/x-shockwave-flash; name=' . $filename);
                    break;
                case 'dcr':
                    MAX_header('Content-type: application/x-director; name=' . $filename);
                    break;
                case 'rpm':
                    MAX_header('Content-type: audio/x-pn-realaudio-plugin; name=' . $filename);
                    break;
                case 'mov':
                    MAX_header('Content-type: video/quicktime; name=' . $filename);
                    break;
                default:
                    MAX_header('Content-type: image/' . $contenttype . '; name=' . $filename);
                    break;
            }
        }
        echo $aCreative['contents'];
    } else {
        // Send "Not Modified" status header
        MAX_sendStatusCode(304);
    }
}
开发者ID:hostinger,项目名称:revive-adserver,代码行数:39,代码来源:image.php

示例2: MAX_redirect

function MAX_redirect($url)
{
    if (!preg_match('/^(?:javascript|data):/i', $url)) {
        $host = @parse_url($url, PHP_URL_HOST);
        if (function_exists('idn_to_ascii')) {
            $idn = idn_to_ascii($host);
            if ($host != $idn) {
                $url = preg_replace('#^(.*?://)' . preg_quote($host, '#') . '#', '$1' . $idn, $url);
            }
        }
        header('Location: ' . $url);
        MAX_sendStatusCode(302);
    }
}
开发者ID:JackyKit,项目名称:revive-adserver,代码行数:14,代码来源:ti.php

示例3: MAX_redirect

function MAX_redirect($url)
{
    if (!preg_match('/^(?:javascript|data):/i', $url)) {
        header('Location: ' . $url);
        MAX_sendStatusCode(302);
    }
}
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:7,代码来源:dxmlrpc.php

示例4: MAX_redirect

function MAX_redirect($url)
{
    header('Location: ' . $url);
    MAX_sendStatusCode(302);
}
开发者ID:villos,项目名称:tree_admin,代码行数:5,代码来源:ag.php

示例5: MAX_commonSetNoCacheHeaders

require_once '../../init-delivery.php';
// Required files
require_once MAX_PATH . '/lib/max/Delivery/adSelect.php';
require_once MAX_PATH . '/lib/max/Delivery/flash.php';
require_once MAX_PATH . '/lib/max/Delivery/javascript.php';
// No Caching
MAX_commonSetNoCacheHeaders();
//Register any script specific input variables
MAX_commonRegisterGlobalsArray(array('layerstyle'));
if (!isset($layerstyle) || empty($layerstyle)) {
    $layerstyle = 'geocities';
}
$plugin = MAX_PATH . $conf['pluginPaths']['plugins'] . 'invocationTags/oxInvocationTags/layerstyles/' . $layerstyle . '/layerstyle.inc.php';
if (!preg_match('/^[a-z0-9-]{1,64}$/Di', $layerstyle) || !@(include $plugin)) {
    // Don't generate output when plugin layerstyleisn't available,just send javascript comment on fail
    MAX_sendStatusCode(404);
    echo '// Cannot load required layerstyle file. Check if openXInvocationTags plugin is installed';
    exit;
}
//Register any script specific input variables
MAX_commonRegisterGlobalsArray(array('block', 'blockcampaign', 'exclude', 'mmm_fo', 'q'));
if (isset($context) && !is_array($context)) {
    $context = MAX_commonUnpackContext($context);
}
if (!is_array($context)) {
    $context = array();
}
$limitations = MAX_layerGetLimitations();
MAX_commonSendContentTypeHeader("application/x-javascript", $charset);
if ($limitations['compatible']) {
    $output = MAX_adSelect($what, $campaignid, $target, $source, $withtext, $charset, $context, $limitations['richmedia'], $GLOBALS['ct0'], $GLOBALS['loc'], $GLOBALS['referer']);
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:al.php


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