username:password@sitename.com
i have a perl script that is linking to a protected directory, at the moment i am linking it to the directory by embedding the username and password into the url, but i want to know if there is any scripting way around this?
Cheers
at the moment i have a link to a protected dir and when someone clicks on it, it prompts them for username and password. But i just realised that if i put a image tag with a height and width of "1" pixel calling the protected directory like this:
username:password@domain.com/protecteddir
then if i click on the link, it doesnt prompt me. So there must be another way to actually do this in perl rather than using a image tag?
below is the current code i have that uses the image tag:
print "<a href=\"http://mydomain.com/secure_folder/\">Forgot your password?</a>\n\n";
print "<img src=\"http://username:password\@mydomain.com/secure_folder/\" width=1 height=1>";
any ideas would be appreciated
Cheers