A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearCan I login to a protected directory via a link? - page 1
User InfoPosts
Can I login to a protected directory via a link?#1
I want to create links to pages and content that are in protected directories. I didn(t program the protected directories I set them up from the host admin page.

I want to be able to give links to user that will take them to page and login as well.

Also if there is a way I want to be able to embed content from the protected directories in other places and not have the password box shop up in order to display the content.

I am using PHP4

Thanks!

posted date: 2009-04-10 08:37:00


Re: Can I login to a protected directory via a link?#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-10 08:37:01


Re: Can I login to a protected directory via a link?#3
Depending on the authentication, you can use a URL like this:http://username:password@yoursite.com/protected_dirI know that works for simple protection via .htaccess. However, keep in mind that you will be sending that link with the password in clear text, and may be inadvertently seen by the wrong people.

posted date: 2009-04-10 08:43:00


Re: Can I login to a protected directory via a link?#4
I tried that before and it didn't work, I just tried it again and it DID work for FF and Chrome but did not work for IE...strange.

posted date: 2009-04-10 08:48:00


Re: Can I login to a protected directory via a link?#5
I believe IE disabled this for security reasons in Windows XP SP2 and newer.

posted date: 2009-04-10 08:49:00


Re: Can I login to a protected directory via a link?#6
Will it work if you change to https?

posted date: 2009-04-10 08:51:00


Re: Can I login to a protected directory via a link?#7
Regarding IE: support.microsoft.com/kb/834489 "Internet Explorer does not support user names and passwords in Web site addresses (HTTP or HTTPS URLs)"

posted date: 2009-04-10 10:31:00


Re: Can I login to a protected directory via a link?#8
Also if there is a way I want to be able to embed content from the protected directories in other places and not have the password box shop up in order to display the content.Read it with fsockopen. Here(s an example od fsockopen with basic authenticationhttp://pl.php.net/manual/en/function.fsockopen.php#32830

posted date: 2009-04-10 17:45:00


Re: Can I login to a protected directory via a link?#9
...I want to be able to embed content from the protected directories in other places and not have the password box shop up in order to display the content.As a direct link this http://username:password@yoursite.com/protected_dir/file.htmldoes not work, but only when attempting to see it with IE browserI think if you want to embed contents via PHP you might use this:file_get_contents("http://username:password@yoursite.com/protected_dir/file.html")If you try this one, plz let me know, i(m interested too.

posted date: 2010-07-11 02:24:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.