当GET具有“http://”或“https://”时出现403错误

时间:2016-02-29 20:53:41

标签: php get http-status-code-403

我似乎遇到了错误。 当我提交表单或有这样的网址“https://example.com/video.php?var=http://test.com/video.mp4”时,我似乎得到403错误。即使我将网址编码为“http%3A%2F%2Ftest.com%2Fvideo.mp4”。它仍然无法运作。 video.php应该做的是获取'var'并嵌入视频。代码看起来像这样。如果网址是“http://”或“https://”

,则无关紧要
<?php
    $VideoSRC = $_GET['v'];
if($_GET['v']){
?>
    <link rel='stylesheet' type='text/css' href='https://example.com/Secure/!/css/fullscreen.css'>
    <!--<video class="videoFullT" preload="none" controls src='<?php echo $VideoSRC; ?>'></video>-->
    <video class="videoFULLT" id="my-video_html5_api" class="vjs-tech" controls autoplay="" preload="auto" data-setup="{}" style="width:100%;height:100%" src="<?php echo $VideoSRC; ?>">
        <source src="<?php echo $VideoSRC; ?>" type="video/mp4">
        <p class="vjs-no-js">
            To view this video please enable JavaScript, and consider upgrading to a web browser that
            <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
        </p>
    </video>
    <?php
    exit();
}

?>
<form action="" method="get">
Video URL: <input type="text" name="v" placeholder="http://example.com/video.mp4" size="30"><br>
<input type="submit" value="Submit!">
</form>

0 个答案:

没有答案