Looking for a little help.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Samantha_Luvcox
    Confirmed User
    • Sep 2002
    • 396

    #1

    Looking for a little help.

    Hi everyone. We are new to this board but have been reading te post and everyone here really seems to know what they are talking about so I was wonding if I could find help on a few questions that we have had.

    1. In our members section we use a SQL based gallery Plus and SQL based Forum, both PHP. The programs seem to work just fine but they require user to register (just like this fourm) where as It would be nice to just have the username passed from the htpasswd file automaticly. We have asked a bunch of diffent people how this could be done but no one seems to know or point us in the right direction.

    2. We are thinking about buying a streaming server for our videos since we have over 35 HOURS of video online and add almost 6 hours of new video every month. Been looking at the xserver from Apple since it seems to have all the software/hardware we would need but we are not sure how we would set it up to prevent hackers from accessing the links to the streams. All video on this new server would have the links to the streams within the Members area of the current server so I was thinking there might be a way to limit the access to the streaming server by only allowing the refering address of the links to the stream on the main site. Since my members area is already protected using various scripts everyone in there should be ok.(Make any sence? LOL) I got the idea from looking at the kinky resources site on preventing hot linking to pictures and thought that there might be a way to alter it to allow ONLY access form a specific referer.

    We are real newbies here. I'm no computer wiz by any means and the site is our first design. Ideas are welcome
    SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.
  • KevinG
    Registered User
    • Sep 2002
    • 10

    #2
    Samantha,

    As much as I would like to help you in regards to both questions I am only qualified to answer one.

    You say you are using a SQL/PHP front end in your members area. You also stated that both of these scripts require the user to login. You can easily obtain the information about the currently logged in user view the HTTP headers, since you mentioned from the htaccess file I would assume you are on a unix machine (The code for a windows machine would be quite different). Because I am not familiar with this board I will attempt to post php code so that you can see how to obtain the current username whether it shows up properly or not I have no clue. If you have access to a friend who is familiar with php it should be fairly easy to override their authentication with yours.

    Code for obtaining the current username/password with Basic HTTP Authentication on a unix machine.
    --------------------------------------------------------------------------------

    PHP Code:
    <?php
     /* Obtain the current username from the $_SERVER Array */
      $uname = $_SERVER['PHP_AUTH_USER'];
     /* Obtain the current password from the $_SERVER Array */
      $upass = $_SERVER['PHP_AUTH_PW'];
    ?>

    ---------------------------------------------------------------------------------
    Samantha you may disregards this as it is for people hosted on a Windows Machine with Authentix.


    Since there is a search feature on this board for those that use Authentix (Flicks Software) on a Windows Platform this will not work. You can use the following code with Authentix (I personally have "Always pass HTTP_AUTHORIZATION as HTTP_AUTHXAUTHORIZATION as such I use that key. If you do not have that option checked you can check it and use this or replace HTTP_AUTHXAUTHORIZATION with HTTP_AUTHORIZATION

    ---------------------------------------------------------------------------------

    PHP Code:
    <?php
     /* Obtain the username:password variable from Authentix */
     /* This gets passed in the format of "Basic                          */    
     /* base64_encode('username:password), because of this  */
     /* we disregard the first 6 characters using substr              */
    
      $uname = substr(getenv("HTTP_AUTHXAUTHORIZATION"), 6);
    
     /* base64 decode the result so that it is readable               */
    
      $uname = base64_decode($uname);

    I hope I was able to help you at least a bit.

    Regards,
    Kevin

    Comment

    • Samantha_Luvcox
      Confirmed User
      • Sep 2002
      • 396

      #3
      Thanks!

      I'm looking at it right now and checking to see if this will work for me.

      Great answer, really nice of you to take the time to try and help

      Kisses

      Oh, email me if you like at [email protected] and I'll set you up on the site for free for the help
      SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.

      Comment

      Working...