devxlogo

Embed a User ID and Password in a URL

Embed a User ID and Password in a URL

Frequently, a Web page or an FTP site has protected areas open only to those with a valid login. As you browse to the page, a form appears querying the user id and password. While this feature is nice for a human user to log on interactively, it could be problematic if you want to automate this Web page or FTP site programmatically or create a shortcut without the interactive login. To solve this problem, you can embed the user id and password into the URL. For example:

 http://userid:[email protected]/ftp://userid:[email protected]/

devx-admin

Share the Post: