hm, habe hier dieses LoginForm:
<form name="login" action="https://domain.de/index.php" method="post">
<input type="text" name="username" value="" />
<input type="password" name="password" />
<input type="submit" onClick="tuWas();return false;" name="btnSubmit" value="Login" />
</form>
und logge mich per cURL ein:
<?
$url = 'https://domain.de/index.php';
$user = 'username';
$pass = 'password';
$curl = curl_init( $url );
curl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, 0 );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $curl, CURLOPT_FOLLOWLOCATION, 1 );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
curl_setopt( $curl, CURLOPT_POST, true );
curl_setopt( $curl, CURLOPT_POSTFIELDS, "username=".$user."&password=".$pass."&btnSubmit=Login" );
curl_setopt( $curl, CURLOPT_HEADER, 0 );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true ); ?>
$result = curl_exec( $curl );
$ok = curl_errno( $curl ) === 0 && curl_getinfo( $curl, CURLINFO_HTTP_CODE ) === 200; // code 200 is required
$curlinfo = curl_getinfo( $curl );
curl_close( $curl );
echo "OK: ".$result; ?>
Funkt leider nicht, da abgefragt wird, ob JavaScript enabled ist.
Hat jemand ne Idee?
Danke und Gruß
Helmuth