This would only be true if your javascript files were parsed with php. If
not, then php can't do anything about it of course. Look into mod_rewrite. I
haven't used it in the sense that you're looking for, but I don't see why
you couldn't.

http://httpd.apache.org/docs-2.0/misc/rewriteguide.html


/bart

-----Original Message-----
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 9:29 AM
To: [EMAIL PROTECTED]
Subject: [PHP] How to protect JavaScript?


Hello! I want to protect a JavaScript: It should only be readable out of
the document, where it is included (with <script language="javascript"
src="/myjs.js">). But it should not be possible to read it directly with
www.myserver.de/myjs.js.

I thought I could do this with PHP (f.e. check the HTTP_REFERER, but
this only works with IE, because NS doesnÄt set the referer for the
script-tag).

Any good ideas?

Martin



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to