Hi,
I am new to php and need your advise on URL Redirection with login credentials
I have following code for URL direction
<?php
header( 'Location: http://www.test.com' ) ;
?>
when i redirect to http://www.test.com, "test.com will ask for username, password and port number"
I need to know how to do redirection including this informations in php code to pass login page. Kindly advise?
Thank You
URL Redirection with login credentials
Moderator: General Moderators
Re: URL Redirection with login credentials
Code: Select all
header( 'Location: http://www.test.com?user=' . $user . '&pwd=' . $pwd ) ;
Re: URL Redirection with login credentials
Thanks for your reply
what suppose to be the right syntax for
username: test
password: test123
what suppose to be the right syntax for
username: test
password: test123
Re: URL Redirection with login credentials
That would be "http://test:test123@www.test.com/" (which is clearly a bad idea because with http, your credentials are sent out in the open for everyone to sniff).
Re: URL Redirection with login credentials
I do understand its bad idea but currently user have to cross 2 levels of authendication and this method will help to pass first level
btw, provided answer dosn't work for my requirment ... could you provide me php code icluding username, password and port number?
btw, provided answer dosn't work for my requirment ... could you provide me php code icluding username, password and port number?