GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Movie Posters - Can you do this? (https://gfy.com/showthread.php?t=94377)

Snake Doctor 12-17-2002 05:50 PM

Movie Posters - Can you do this?
 
Can you use cookies and htaccess to protect movies if the html page where the cookie is set is on a different domain and server than the one the movies are on? (i.e. I have the gallery on one host and the movie files on a cheap ass host)

The cookies and htaccess work for me when I've got all the files on the same domain, but when I try it with the movie files on the other server I get errors in windows media about the file being corrupt.

Is this not possible or am I doing something wrong?

Mr.Fiction 12-17-2002 06:28 PM

Here is a movie poster for Lord of the Rings:
http://imagecache2.allposters.com/im...LORDOF2AOS.jpg

Snake Doctor 12-17-2002 06:31 PM

Well that wasn't very funny, but at least you bumped my thread :thumbsup

Madball 12-17-2002 06:32 PM

From what I know, a cookie set by domain A can NOT be read by domain B. Not even different subdomains on the same domain. Won't work.

Mr.Fiction 12-17-2002 06:32 PM

Quote:

Originally posted by Lenny2
Well that wasn't very funny, but at least you bumped my thread :thumbsup
I'll try harder next time. Sorry. :)

eRock 12-17-2002 06:40 PM

Quote:

Originally posted by Lenny2
Well that wasn't very funny, but at least you bumped my thread :thumbsup
Ah well...and here I was on the same wavelength as Mr. Fiction. That's the first thing that popped into my mind...an actual; poster from a movie. He got a chuckle outta me.

missnglnk 12-17-2002 07:55 PM

Quote:

Originally posted by Madball
From what I know, a cookie set by domain A can NOT be read by domain B. Not even different subdomains on the same domain. Won't work.
They can if you properly set the cookie domain value. If set to '.domain.com', it will allow all subdomains, if set to 'domain.com', it will only allow that domain, and if set to 'blah.domain.com', it will only allow that subdomain.

SpaceAce 12-17-2002 09:01 PM

When you set a cookie, you tell the cookie which domains to send itself to. Unless you are operating scripts on both servers, there's really no way for you to do what I think you are talking about.

SpaceAce

Snake Doctor 12-17-2002 09:12 PM

Quote:

Originally posted by missnglnk


They can if you properly set the cookie domain value. If set to '.domain.com', it will allow all subdomains, if set to 'domain.com', it will only allow that domain, and if set to 'blah.domain.com', it will only allow that subdomain.

This is the javascript I'm using to set the cookie (without the opening and closing javascript tags)

// Calculate the expiration date
var expires = new Date ();
expires.setTime(expires.getTime() + 24 * 60 * 60 * 1000);

document.cookie = "id=valid; path=/" + "; expires=" + expires.toGMTString();


and this is what's in the htaccess file

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*mydomain.COM(:80)*/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com(:80)*/ [NC]
RewriteCond %{HTTP_REFERER} !^http://mydomain.com(:80)*/ [NC]
RewriteCond %{HTTP_COOKIE} !(^|(.+;)*)id=valid(;.*|$)
RewriteRule /* http://www.redirecturl.COM [R,L]


It works when I put the movies in a subfolder of the directory the html page is in, but it fucks up when I have the movies on another server.

m0rph3us 12-17-2002 09:20 PM

Quote:

Originally posted by Lenny2


This is the javascript I'm using to set the cookie (without the opening and closing javascript tags)

// Calculate the expiration date
var expires = new Date ();
expires.setTime(expires.getTime() + 24 * 60 * 60 * 1000);

document.cookie = "id=valid; path=/" + "; expires=" + expires.toGMTString();


and this is what's in the htaccess file

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*mydomain.COM(:80)*/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com(:80)*/ [NC]
RewriteCond %{HTTP_REFERER} !^http://mydomain.com(:80)*/ [NC]
RewriteCond %{HTTP_COOKIE} !(^|(.+;)*)id=valid(;.*|$)
RewriteRule /* http://www.redirecturl.COM [R,L]


It works when I put the movies in a subfolder of the directory the html page is in, but it fucks up when I have the movies on another server.

you can't have domainB read domainA's cookie.

Undutchable 12-17-2002 09:25 PM

Your question is funny in a way. You say you use hotlink protection, and then you think it's weird that you get an error in WMP when you hotlink the movies? :winkwink:

Morgan 12-17-2002 11:09 PM

I couldve sworn this thread was about "motion picture posters" as well.


All times are GMT -7. The time now is 08:47 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123