I don't have an ebay account, so I can't test this script.

I found that the ebay login POST sends this data:

Array
(
[co_partnerid] => 2
[siteid] => 77
[UsingSSL] => 1
[MfcISAPICommand] => SignInWelcome
[lse] => false
[lsv] =>
[mid] =>
[hmid] =>
[co_partnerId] => 2
[ru] =>
[pp] =>
[pa1] =>
[pa2] =>
[pa3] =>
[i1] => -1
[pageType] => -1
[rtmData] =>
[userid] => username
[pass] => password
[keepMeSignInOption] => 1
)

It is possible that you aren't sending enough data to the connection.

-genius_at_work