logging in to squirrelmail email account

Help
poiu
2014-06-14
2014-06-14
  • poiu
    poiu
    2014-06-14

    Hi,

    I'm testing my login script below by trying to access my squirrelmail account. But it is failing and from the error message I get (i.e. "please log in" as opposed to "your username/password are incorrect") I don't think the POST variables are being recognised.

    Please could someone point me in the right direction?

    Thanks,

    Stub

    / load the snoopy class and initialize the object /
    $snoopy = new Snoopy();

    / set some values /
    $login_form['login_username'] = 'username';
    $login_form['secretkey'] = 'password';

    $snoopy->cookies['vegetable'] = 'carrot';
    $snoopy->cookies['something'] = 'value';

    / submit the data and get the result /
    $snoopy->submit('http://webmail.mywebsitename.com/src/redirect.php', $p_data);

    / output the results /
    echo '

    ' . htmlspecialchars($snoopy->results) . '
    ';