2011-05-31, 02:55 PM
<?php
$postdata = http_build_query(
array(
'username' => 'user',
'password' => 'name',
'action' => 'do_login',
'remember' => 'yes',
'submit' => 'Anmelden',
'url' => ''
)
);
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata
)
);
$context = stream_context_create($opts);
$result = file_get_contents('http://domain/member.php?action=do_login', false, $context);
echo $result;
Allways returns badlogin, username or password false. But the logindatas are correct.