This is what I use. IE is smart enough to parse out the user/pw from the
location bar, so you should be pretty good. FYI, some forms of media may
need this sent too, like mediaplayer -- which is annoying b/c it tries to
authenticate! Bastards.

http://$username:[EMAIL PROTECTED]/protected/

And for media, try this...
http://$username:[EMAIL PROTECTED]/protected/mymovie.wmv

Daevid Vincent
http://daevid.com
  

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, October 15, 2003 7:06 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Sending htaccess auth information through php
> 
> Hi there, i was wondering if there was a way to send htaccess auth
> information through php. My application is loading a parent 
> flash movie
> which externally loads flash videos within a directory i want 
> to password
> protect with htaccess. I was wondering how could it be 
> possible to send
> headers to that the parent flash can load the external videos 
> without a
> password box popping up ?
> 
> Basically there is two solutions. Password protect the 
> directory and work
> out a way to get flash to load the flash videos without a password box
> popping up.
> 
> Or doing a fopen and fread on flash files outside the web 
> directory like so.
> 
> header("Content-type: application/x-shockwave-flash");
> $fp = @fopen("/path/".$_GET['filename'],"r");
> $swf = @fread($fp,filesize("/path/".$_GET['filename']));
> @fclose ($fp);
> echo $swf;
> 
> This will output the binary information, then the parent 
> flash loads that
> php file with the filename into a movie container. It works but is it
> slower than the first solution ?
> 
> Let me know.
> 
> Dan
> (whos punctuation is hopefully better than in the past)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to