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

PHP proxyURL函数代码示例

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

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



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

示例1: postParse

function postParse($input, $type)
{
    switch ($type) {
        case 'html':
            # Create URL to JW Player
            $player_url = GLYPE_URL . '/player.swf';
            # Generate URL to flv file through proxy script
            $flvUrl = rawurlencode(proxyURL(sprintf('%s', videourl)));
            # Generate HTML for the flash object with our new FLV URL
            $html = "<embed src=\"{$player_url}\" width=\"640\" height=\"360\" bgcolor=\"000000\" allowscriptaccess=\"always\" allowfullscreen=\"true\" type=\"application/x-shockwave-flash\" flashvars=\"width=640&height=360&type=video&fullscreen=true&volume=100&autostart=true&file={$flvUrl}\" />";
            if (!defined('videourl')) {
                $html = '<div style="color:#333;font-size:24px">This video cannot be displayed.</div>';
            }
            # Add our own player into the player div
            $input = preg_replace('#<div id="player".*?<div id="watch7-main-container">#s', '<div id="player"><div id="player-api" class="player-width player-height off-screen-target" style="overflow: hidden;">' . $html . '</div></div><div id="watch7-main-container">', $input, 1);
            $input = preg_replace('#http:\\\\/\\\\/s.ytimg.com\\\\/yt\\\\/swf\\\\/watch-vfl157150.swf\\\\#s', '' . $player_url . '\\', $input, 1);
            $input = preg_replace('#http:\\\\/\\\\/s.ytimg.com\\\\/yt\\\\/swf\\\\/watch-vfl157150.swf\\\\#s', '' . $player_url . '\\', $input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch-vfl157150.swf#s', '' . $player_url . '', $input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch-vfl127661.swf#s', '' . $player_url . '', $input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch_as3-vfl128003.swf#s', '' . $player_url . '', $input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch_v8-vfl127661.swf#s', '' . $player_url . '', $input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch-vfl142129.swf#s', '' . $player_url . '', $input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch_v8-vfl142129.swf#s', '' . $player_url . '', $input, 1);
            break;
    }
    return $input;
}
开发者ID:yyhaoyue,项目名称:PHPProxy,代码行数:27,代码来源:youtube.com.php


示例2: postParse

function postParse($input, $type)
{
    switch ($type) {
        case 'html':
            if (!defined('video_url')) {
                return $input;
            }
            # Create URL to JW Player
            $player_url = GLYPE_URL . '/player.swf';
            # Generate URL to flv file through proxy script
            $flvUrl = rawurlencode(proxyURL(sprintf('%s', video_url)));
            # Generate HTML for the flash object with our new FLV URL
            $html = "<embed src=\"{$player_url}\" width=\"640\" height=\"360\" bgcolor=\"000000\" allowscriptaccess=\"always\" allowfullscreen=\"true\" type=\"application/x-shockwave-flash\" flashvars=\"width=640&height=360&type=video&fullscreen=true&volume=100&autostart=true&file={$flvUrl}\" />";
            # Add our own player into the player div
            $input = preg_replace('#<div id="watch-video-container">(.*?)</div>#s', '<div id="watch-video-container">', $input, 1);
            $input = preg_replace('#<div id="watch-video-container">(.*?)</div>#s', '<div id="watch-video-container">', $input, 1);
            $input = preg_replace('#<div id="watch-video-container">(.*?)</div>#s', '<div id="watch-video-container"><div id="watch-video" class=" "><script>if \\(window.yt.timing\\) \\{yt.timing.tick\\(\'bf\', \'\'\\)\\;\\}</script><div id="watch-player" class="flash-player">' . $html . '</div></div></div><div id="watch-main"></div>', $input, 1);
            $input = preg_replace('#http:\\\\/\\\\/s.ytimg.com\\\\/yt\\\\/swf\\\\/watch-vfl157150.swf\\\\#s', '' . $player_url . '\\', $input, 1);
            $input = preg_replace('#http:\\\\/\\\\/s.ytimg.com\\\\/yt\\\\/swf\\\\/watch-vfl157150.swf\\\\#s', '' . $player_url . '\\', $input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch-vfl157150.swf#s', '' . $player_url . '', $input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch-vfl127661.swf#s', '' . $player_url . '', $input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch_as3-vfl128003.swf#s', '' . $player_url . '', $input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch_v8-vfl127661.swf#s', '' . $player_url . '', $input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch-vfl142129.swf#s', '' . $player_url . '', $input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch_v8-vfl142129.swf#s', '' . $player_url . '', $input, 1);
            break;
    }
    return $input;
}
开发者ID:xiyiji,项目名称:glype,代码行数:29,代码来源:youtube.com.php


示例3: preParse

function preParse($html, $type)
{
    if (stripos($html, 'loadingError')) {
        header("Location: " . proxyURL('http://mail.google.com/mail/?ui=html'));
        exit;
    }
    return $html;
}
开发者ID:yyhaoyue,项目名称:PHPProxy,代码行数:8,代码来源:google.com.php


示例4: postParse

function postParse($input, $type)
{
    switch ($type) {
        case 'html':
            if (defined('videourl')) {
                # Create URL to JW Player
                $player_url = GLYPE_URL . '/player.swf';
                # Generate URL to flv file through proxy script
                $flvUrl = rawurlencode(proxyURL(sprintf('%s', videourl)));
                # Generate HTML for the flash object with our new FLV URL
                $html = "<embed src=\"{$player_url}\" width=\"1280\" height=\"720\" bgcolor=\"000000\" allowscriptaccess=\"always\" allowfullscreen=\"true\" type=\"application/x-shockwave-flash\" flashvars=\"width=1280&height=720&type=video&fullscreen=true&volume=100&autostart=true&file={$flvUrl}\" />";
                # Replace video player
                $input = preg_replace('#<div id="player-api"([^>]*)>.*<div class="clear"#s', '<div id="player-api"$1>' . $html . '</div></div><div class="clear"', $input, 1);
            }
            break;
    }
    return $input;
}
开发者ID:ElliotGluck,项目名称:bsd-unblocker,代码行数:18,代码来源:youtube.com.php


示例5: Request

/*****************************************************************
* Execute the request
******************************************************************/
# Initiate cURL wrapper request object with our cURL options
$fetch = new Request($toSet);
# And make the request
$document = $fetch->go($URL);
/*****************************************************************
* Handle aborted transfers
******************************************************************/
if ($fetch->abort) {
    switch ($fetch->abort) {
        # Do a redirection
        case 'redirect':
            # Proxy the location
            $location = proxyURL($fetch->headers['location'], $flag);
            # Do not redirect in debug mode
            if (DEBUG_MODE) {
                $fetch->redirected = '<a href="' . $location . '">' . $fetch->headers['location'] . '</a>';
                break;
            }
            # Go there
            header('Location: ' . $location, true, $fetch->status);
            exit;
            # Send back a 304 Not modified and stop running the script
        # Send back a 304 Not modified and stop running the script
        case 'not_modified':
            header("HTTP/1.1 304 Not Modified", true, 304);
            exit;
            # 401 Authentication (HTTP authentication hooks not available in all PHP versions
            # so we have to use our method)
开发者ID:yyhaoyue,项目名称:PHPProxy,代码行数:31,代码来源:browse.php


示例6: pow

         }
         # Current bit
         $bit = pow(2, $i);
         # Set bitfield
         if (!empty($_POST[$name])) {
             setBit($bitfield, $bit);
         }
         # Increase index
         ++$i;
     }
     # Save new bitfield in session
     $_SESSION['bitfield'] = $bitfield;
     # Save valid entry
     $_SESSION['no_hotlink'] = true;
     # Redirect to target
     redirect(proxyURL($url, 'norefer'));
     break;
     /*************************************************************
      * Agree to our SSL warning.
      **************************************************************/
 /*************************************************************
  * Agree to our SSL warning.
  **************************************************************/
 case 'sslagree':
     # Flag our SSL warnedness
     $_SESSION['ssl_warned'] = true;
     # Return to previous page
     $redirectTo = isset($_SESSION['return']) ? $_SESSION['return'] : 'index.php';
     # Clear session return value
     unset($_SESSION['return']);
     # Redirect
开发者ID:sushanghimire,项目名称:ron-old-contents,代码行数:31,代码来源:process.php


示例7: css_src

function css_src($input)
{
    return 'src=' . $input[1] . proxyURL($input[2]) . $input[1];
}
开发者ID:simonsmh,项目名称:simonsmh.tk,代码行数:4,代码来源:parser.php


示例8: proxifyURL

function proxifyURL($url, $givenFlag = false)
{
    return proxyURL($url, $givenFlag);
}
开发者ID:milan-hwj,项目名称:tempGit,代码行数:4,代码来源:init.php


示例9: define

<?
/*******************************************************************
* Glype is copyright and trademark 2007-2016 UpsideOut, Inc. d/b/a Glype
* and/or its licensors, successors and assigners. All rights reserved.
*
* Use of Glype is subject to the terms of the Software License Agreement.
* http://www.glype.com/license.php
******************************************************************/

define('mobilemail',proxyURL('http://m.yahoo.com/mail'));
if(stripos($toLoad,'mail.yahoo.com')){header('Location: '.mobilemail);exit;}
function preParse($html,$type){
	if($type=='html') {
		$html = preg_replace('#r/(m6|lk|l6|m7|m2|l4)#', mobilemail, $html);
	}
	return $html;
}
开发者ID:simonsmh,项目名称:simonsmh.tk,代码行数:17,代码来源:yahoo.com.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP proxy_url函数代码示例发布时间:2022-05-15
下一篇:
PHP protegerme函数代码示例发布时间: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