Results 1 to 9 of 9
  1. #1

    How do I imbed Usrname/Psswrd Form in http page to access private ftp accounts?

    I would like to be able to have an html page with an imbeded Username & Password form that I can use to access my private ftp accounts on my shared webserver. Does anyone know how I could do this? ex. I go to http://www.mydomain.com & my home page would just be a username and password field imbeded in the page to log on to my private ftp accounts. I would really appreciate if someone could explain how to do this in laymens terms. I'm currently going to ftp://mydomain.com and using "file" "login as" in Internet Explorer to access my accounts.
    Thanks. Newbie

    Also would The webhost have to do somthing on his end to make this work? I think Im on an APACHE (1.3.33 (Unix))

  2. #2
    Join Date
    Apr 2003
    Posts
    356
    You can use PHP

    Code:
    <?php
    header("ftp://USER:[email protected]");
    ?>

  3. #3
    Join Date
    Feb 2005
    Location
    Seattle, Washington
    Posts
    144
    You could also use the PHP ftp extension
    http://www.php.net/ftp
    Regards,
    Matthew Fonda
    PHP Developer

  4. #4
    pztup wrote: "You can use PHP code:

    <?php
    header("ftp://USER[email protected]");
    ?>"


    I'm a GUI user I do not understand code other than pasting it somewhere. Is this somthing I can do or do I need to get a 3rd party support? Where do I insert this code?


    mfonda - thank you for the link, the information is a little crytic to me since I dont understand code but it looks like a step in the right direction. I will look into how to implement php.

  5. #5
    Join Date
    Nov 2002
    Location
    United Kingdom
    Posts
    247
    Or, if you don't want to use PHP (don't see why you wouldn't) you could use some javascript to do it

    Code:
    <script language="javascript">
    function ftplogin() {
    	document.location.href = 'ftp://'+document.myform.user.value+':'+document.myform.pass.value+'@'+document.myform.domain.value;
    }
    </script>
    
    <form name="myform">
    user <input type="text" name="user"><br>
    pass <input type="text" name="pass"><br>
    <select name="domain">
    <option value="domain1.com">domain1.com</option>
    <option value="domain2.com">domain2.com</option>
    </select><br>
    <input type="button" value="login" onclick="ftplogin()">
    </form>

  6. #6
    First Thanks for all replys!

    X-TechMedia, I was able to cut & paste your code into Frontpage, substitute domain.com with my own, save it, upload it to my web server and I can use it to log right in to my private FTP accounts from my home page. That is exactly what I've been trying to do for about a week now- thanks for the easy solution for a code iliterate GUI using newbie.

  7. #7
    OK - I spoke to soon on this one

    Thanks for the code however it creates another issue- when you log on to the private ftp via this code you are not in one of those windows that lets you drag and drop files on and off the web server. Do you have any suggestions?

  8. #8
    Join Date
    Jun 2004
    Location
    Bay Area -USA
    Posts
    1,738
    If you used IE i think the code above should work with drag and drop.

    Besides all this code hassle... i think you should use the program smart FTP. Its a free download and plus it looks nice.

    Maybe that would be a better solution if its only you?
    <<< Please see Forum Guidelines for signature setup. >>>

  9. #9
    VolkNet If you used IE i think the code above should work with drag and drop
    That's the problem, it wont work- IE just displays what is in the private ftp account but wont allow drag & drop function. I think when you log in via the IE browser it gives you a special window capable of drag & drop.

    Besides all this code hassle... i think you should use the program smart FTP. Its a free download and plus it looks nice.
    this isnt for me it's for my clients and im trying to make file transfering as easy as possible- which would eliminate any third party option.

Posting Permissions

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