PDA

View Full Version : Hotlinking mpeg cookie question, guys?????


paul34
12-31-2001, 07:44 PM
Hi,

Is this script correct?
I found it on this board a day ago.
There was a problem with the Cookie line - an image
remed a period or somethin???

What's the 6. 60 *60?

I know the 6 is hours. What's the 60 bit?


RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*yourdomain.com/ [NC]
RewriteCond %{HTTP_CeeKIE} !(^|(.+ *)id=valid(;.* |$)
RewriteRule /* http://%{HTTP_HOST}/ [R,L]


(start the script removed for the board - changed to 'ceekie')

// Calculate the expiration date
var expires = new Date ();
expires.setTime(expires.getTime() + 6 * 60 * 60 * 1000);
document.ceekie = "id=valid; path=/" + "; expires=" + expires.toGMTString();

(end the script I removed as board would'nt have it)

Thanks for your help, if any!

Mogul
12-31-2001, 08:29 PM
For movies, use the .htaccess info here:

http://www.mgp2.com/htaccessinfo.txt

Drop the cookie part in say your movie post page.


Mogul
MGP2.COM
:D

paul34
12-31-2001, 08:52 PM
Okay thanks!

Does it protect your flash files as well?

Mogul
12-31-2001, 11:05 PM
Paul,

My flash files are designed internally to play where I tell them to. it is all actionscripting.

But the same principle could apply becuase what the htaccess is doing is looking for cookie set. If = no then all in the directory and sub dirs is denied.

Mogul
MGP2.com
The Source.

paul34
01-01-2002, 05:19 AM
Great! Understood!

thanks!

allen
01-02-2002, 09:52 AM
Anyone wanna help a newbie with this?

Icq# 41821474

kanga
01-02-2002, 10:27 AM
> expires.setTime(expires.getTime() + 6 * 60 * 60 * 1000);

sets the cookie expire time on 6 hours from now (current time + (1000 miliseconds X 60 x 60 x 6))

kanga / sleazepit

paul34
01-02-2002, 11:03 AM
So what happens If i want a 24hr. cookie?
Does the 60 60 chane at all?