Need Help
Moderator: General Moderators
- andre_c
- Forum Contributor
- Posts: 412
- Joined: Sun Feb 29, 2004 6:49 pm
- Location: Salt Lake City, Utah
I've been using this:
Maybe someone has something better but this has worked for me.
You need to do this before any output reaches the browser
Code: Select all
header("Expires: Mon, 14 Jul 1789 12:30:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0You need to do this before any output reaches the browser
-
TheBentinel.com
- Forum Contributor
- Posts: 282
- Joined: Wed Mar 10, 2004 1:52 pm
- Location: Columbus, Ohio
-
TheBentinel.com
- Forum Contributor
- Posts: 282
- Joined: Wed Mar 10, 2004 1:52 pm
- Location: Columbus, Ohio
Well, I can't say for sure, but I think all those headers don't mean anything if the browser doesn't respect them. Maybe IE does respect them, but does Firefox? Does Dave's Custom Browser?AllenTan wrote:so you are saying that applying no cache is not secure enough for my pages!? am I right?
cuz people can easyly do this: browser is set to get a new version of the page every visit
It's almost like trying to prevent people from viewing your HTML source, or keeping them from copying your images. You can put up roadblocks, but moderately-determined users can always drive around them.
thanks and you are right!
Here it is what I am going to do.
I will have some .mov and .swf files on my php pages and wont people grab them easyly. and all these pages will have password protected. I think I should go and look for something that goes with does opjects. am I right?
any idea for this?
thanking you in advance!!!
cheers
Al
Here it is what I am going to do.
I will have some .mov and .swf files on my php pages and wont people grab them easyly. and all these pages will have password protected. I think I should go and look for something that goes with does opjects. am I right?
any idea for this?
thanking you in advance!!!
cheers
Al
-
TheBentinel.com
- Forum Contributor
- Posts: 282
- Joined: Wed Mar 10, 2004 1:52 pm
- Location: Columbus, Ohio
I'm sorry, Al, I'm not following what you want to do. Do you want to show people .mov and .swf files, but prevent them from saving them to their computers?AllenTan wrote:I will have some .mov and .swf files on my php pages and wont people grab them easyly. and all these pages will have password protected. I think I should go and look for something that goes with does opjects. am I right?
-
TheBentinel.com
- Forum Contributor
- Posts: 282
- Joined: Wed Mar 10, 2004 1:52 pm
- Location: Columbus, Ohio
See, it's impossible. The way they view your files is by downloading them to their computers. You can put one of those annoying scripts on your site that "disables" the right-click menu and I think you can even convince IE to disable the "save" option for the page. But the files are right there in their cache.TheBentinel.com wrote: I'm sorry, Al, I'm not following what you want to do. Do you want to show people .mov and .swf files, but prevent them from saving them to their computers?
Even if you manage to get in their way, a determined user can get past it. And the first time the code you put in place manages to prevent a user from viewing your site, you've lost any advantage you've tried to gain.
Do what you like, of course. But my advice is to just host great content and not sweat the very few users that plagarize your stuff.
-
TheBentinel.com
- Forum Contributor
- Posts: 282
- Joined: Wed Mar 10, 2004 1:52 pm
- Location: Columbus, Ohio
Helle Dave,
this is the site that I was talking about.
http://www.vtc.com/products/claris.htm
when you see the movies, it does not store in your computer.
try it yourself please.
Al
this is the site that I was talking about.
http://www.vtc.com/products/claris.htm
when you see the movies, it does not store in your computer.
try it yourself please.
Al
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
Code: Select all
function openWindow(url)
{
p=url.indexOf("movie");
mtitle=url.substring(p+10,url.length);
movienum=url.substring(p+8,p+10);
chapter=url.substring(p+6,p+8);
movieURL=url.substring(url.length-9,url.length);
winwidth=640;
winheight=480+50;
wposx=0;
wposy=0;
file='http://mediaservers.vtc.com/movieplayers/movieplayer.php?size=small&foldername=cw5&title='+mtitle+'&movie='+chapter+movienum+'';
popupWin = window.open(file,"vtcplayer","status=no,resizable=no,toolbar=no,scrollbars=no,screenX="+wposx+",screenY=0,left="+wposx+",top="+wposy+",width="+winwidth+",height="+winheight);
}Code: Select all
<img src='/images/movie.gif'> <a href="javascript:openWindow('movie=
010433045');"> Ruler Bar</a><br>It's impossible..