sallos
1
Moin,
ich wollte mal kurz fragen hat jemand schon mal versucht den AMD RaidXpert auszulesen?
Ich habe es versucht aber ich bekomme das Passwort und den Username nicht übergeben.
Diese Seite möchte ich parsen:
http://localhost:25902/amd/objMod.jsp?object=ld_0_100942738_0_000
Aber wenn ich sie aufrufe kommt eine Meldung bitte Einloggen.
Hat jemand ne Idee
ralf
2
schon mal mit
http://user:passwort@localhost:25902/amd/objMod.jsp?object=ld_0_100942738_0_000
probiert?
sallos
3
Ja hab ich getestet aber „Bitte melden sie sich erneut an“
sallos
4
Habs nun mal so versucht:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost:25902/amd/login.jsp");
curl_setopt($ch, CURLOPT_POSTFIELDS, 'login="admin"&password="admin"&action="login.jsp"');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, "test");
curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
echo curl_exec($ch);
$opts = array(
'http'=>array(
'header'=>"Accept-language: en
" .
"Cookie: foo=bar
"
)
);
$context = stream_context_create($opts);
//$html = file_get_contents("http://192.168.2.22:25902/amd/login.jsp",false,$context);
$html = file_get_contents("http://localhost:25902/amd/screen.jsp",false,$context);
echo $html;
curl_close($ch);
Nun bewkomm ich als Rückmeldung „Please log in again“