SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    NH
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Username & Password in URL (IE problem)

    Hi Folks,

    I'm trying to download a cpanel daily backup by passing the username and password in the URL. It works perfectly in Firefox but I get a syntax error in IE. Someone told me IE doesn't support this anymore but this was the first time I had heard this.

    This is my little script. Any suggestions to make this work appreciated. The file is in an htaccess password protected directory. The client wants to be able to download the file in IE without the use of FTP or actually logging into cpanel itself.

    Thanks,
    Rob.

    Code:
    <?php
    $username = 'user';
    $password = 'pass';
    $domain = 'domain.com';
    $filename = 'backup-'. $domain . '-' . date('n-j-Y') . '.tar.gz';
    
    print '<a href="http://' . $username . ':' . $password . '@www.' . $domain . ':2082/getbackup/' . $filename . '">Daily Site Backup</a>';
    ?>

  2. #2
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by 1skydive
    Hi Folks,

    I'm trying to download a cpanel daily backup by passing the username and password in the URL. It works perfectly in Firefox but I get a syntax error in IE. Someone told me IE doesn't support this anymore but this was the first time I had heard this.
    That's true.

    http://support.microsoft.com/default...en-us%3b834489

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    NH
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stereofrog
    Thanks for the clarification. So, is there a way to do what I'm trying to do? I was thinking of trying to use cURL but I'm not having much luck with the download part.

    I know now why I don't IE anymore.


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
  •