Sending htaccess auth information through php

This is a discussion on Sending htaccess auth information through php within the PHP General forums, part of the PHP Programming Forums category; This is what I use. IE is smart enough to parse out the user/pw from the location bar, so ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-17-2003
Daevid Vincent
 
Posts: n/a
Default Sending htaccess auth information through php

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:$password@www.mysite.com/protected/

And for media, try this...
http://$username:$password@www.mysite.com/protected/mymovie.wmv

Daevid Vincent
http://daevid.com


> -----Original Message-----
> From: daniel@electroteque.org [mailto:daniel@electroteque.org]
> Sent: Wednesday, October 15, 2003 7:06 PM
> To: php-general@lists.php.net
> 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)

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:17 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0