SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Webmail - login page

    Hi,

    I'd like to make a page on my site with a login option for my site's webmail. The thing is, when I access my webmail, the pop up login appears, asking for my user/pass.

    Is there a way to create a form for my webmail?

    Thanks.

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You mean like this? http://www.eudoramail.com/

    I assume you must be using .htaccess or something similar to control access at the moment. That will always challenge you with a login alert. You need to change the way your access control works to log in through a form.

    G

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah like that!

    The .htaccess is my host's default, I haven't touched that stuff yet. What do you mean by changing how the access control works? How would I do that? I'm pretty new to that stuff. I know how to make forms, but I'm not familiar with the .htaccess.

    Thanks.

  4. #4
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmmm ... seems I was wrong. Looks like you CAN use .htaccess in conjunction with a form. I've no idea how it works though -- I use NT servers myself.

    Have a look at this: http://htaccess.technotrade.com/

    It's not free but it's a good example. Also search the web for 'free perl password protect' if your server is a Unix box. There seems to be some good stuff out there that will use .htaccess effectively to get the results you want.

    Good luck!

    G

  5. #5
    SitePoint Member
    Join Date
    Sep 2002
    Location
    Drummondville, Qc
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make a file that you can call if you want webmail.php and in it put this code.

    PHP Code:
    <?
    /*
     To use create an html form that POST's to this script.
     The fields should be:

     1) A username field - set its name to "user".
     2) A password field - set its name to "pass".
     3) A Domain field
    */
    #

    ?>
    <html>
    <head>
    <title>Logging In...</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="refresh" content="1;URL=http://<? print "$user:$pass@$domain:2095/$user+$domain"?>">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <p><b>Hi <? print "$user"?>!</b></p>
    <p>Please wait while you are logged in!</p>
    </body>
    </html>
    Then on your site, create a form that will have the action going to the webmail.php file you just created. In that form, add 3 fields:
    username (need to call the field user)
    domain name (need to call the field domain)
    password (need to call the field pass)

    so the way you can set this up can be something like

    form
    input username @ input domain
    input password

    submit
    /form
    Jacynthe Durocher
    Senior Designer & Developer
    Adrianet Corporation

  6. #6
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm confused .... that doesn't appear to be using .htaccess and certainly isn't very secure. You're writing username and pwd details back to a HTML page that could be cached or anything!

    Edit:

    Ahhh -- I see what you're doing. But it's a bit silly to use a META redirect. Use a server-side one ... surely?!


    G
    Last edited by greg.harvey; Oct 1, 2002 at 04:18.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •