you need to call the login page specifically
I am .. the login url is internal so it looks like this
http://192.168.2.114/dsweb/Login
..that is what I am calling in my HttpRequest.
f it also checks whether the submit button has been pressed
I don't believe that to be the case.
Currently there is a perl script running that does the basically the same function. I am just trying to get it to work in PHP
here is that code .. well the part that handles the log in anyway.
#get login
$req = HTTP::Request->new(GET => $url.'/dsweb/Login');
$req->authorization_basic($win_login,$win_password) if $win_login;
$res = $ua->request($req);
my $html = $res->as_string;
#print "$html";
my @forms = HTML::Form->parse($html, $url);
my $search_form;
foreach my $form (@forms) {
if ($form->{action}=~m/Login/) {
$search_form = $form;
last;
}
}
@forms = undef;
print $search_form->dump;
$search_form->value('username',$user);
$search_form->value('password',$pass);
$req = $search_form->make_request;
it looks to me like the perl script is searching for the right form to add the values to and then submitting that form.
the name of the button that submits the correct form on the login page is name="Login"
the action of that form is action="192.168.2.114/dsweb/ApplyLogin"
any ideas??