简体   繁体   English

如何用PHP隐藏URL vlue

[英]how to hide url vlue with php

Hello I have a js code in which i want to hide the actual url and show a md5 hash with my domain if any one try to copy the source he will get the invalid destination so the script can only work on my domain 您好,我有一个js代码,如果有人尝试复制源代码,我想隐藏实际的网址并在我的域中显示md5哈希,他将获得无效的目的地,因此该脚本只能在我的域上工作

here is the js code i have 这是我的js代码

<script>
jwplayer("container").setup({
    width:640,
    height:360,
    stretching:"exactfit",
    primary: "HLS",
    autostart:true,
    image: "http://url-of-image",
    file: "http://url-of-file"
});
</script>

so i want to hide both url-of-image and url-of-file 所以我想同时隐藏图片 网址和文件网址

You cannot hide the URL, because it will be visible to the end user at final stage. 您无法隐藏该URL,因为最终用户将在最终阶段看到该URL。 You better set a cookie on your page and when delivering video or any file check if cookie exists. 您最好在页面上设置cookie,并在交付视频或任何文件时检查cookie是否存在。 Here you can find an example: 在这里您可以找到一个例子:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_COOKIE} !example-cookie=true
RewriteRule .* /err/401.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM