cURL login em ebay.co.uk

Eu tenho tentado há algum tempo usar cURL para fazer o login no eBay.co.uk. Os cookies estão sendo definidos e os dados da postagem estão sendo enviados corretamente, mas não tenho certeza se o arquivo do cookie está sendo lido novamente ou mesmo configurado corretamente, já que estou recebendo uma página do eBay que informa que preciso ativar cookies meu navegador.

Aqui está a classe cURL que estou usando:

class Curl {
    private $ch;
    private $cookie_path;
    private $agent;

    public function __construct($userId) {
        $this->cookie_path = dirname(realpath(basename($_SERVER['PHP_SELF']))).'/cookies/' . $userId . '.txt';
        $this->agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)";
    }

    private function init() {
        $this->ch = curl_init();
    }

    private function close() {
        curl_close ($this->ch);
    }

    private function setOptions($submit_url) {
        curl_setopt($this->ch, CURLOPT_URL, $submit_url);
        curl_setopt($this->ch, CURLOPT_USERAGENT, $this->agent); 
        curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);  
        curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);
        //curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($this->ch, CURLOPT_COOKIEFILE, $this->cookie_path);         
        curl_setopt($this->ch, CURLOPT_COOKIEJAR, $this->cookie_path);
    }

    public function curl_cookie_set($submit_url) {
        $this->init();
        $this->setOptions($submit_url);
        $result = curl_exec ($this->ch);
        $this->close();
        return $result;
    }

    public function curl_post_request($referer, $submit_url, $data) {
        $this->init();
        $this->setOptions($submit_url);
        $post = http_build_query($data);
        curl_setopt($this->ch, CURLOPT_POST, 1);  
        curl_setopt($this->ch, CURLOPT_POSTFIELDS, $post);  
        curl_setopt($this->ch, CURLOPT_REFERER, $referer);
        $result = curl_exec ($this->ch);
        $this->close();
        return $result;
    }

    public function curl_clean() {
        // cleans and closes the curl connection
        if (file_exists($this->cookie_path)) { 
            unlink($this->cookie_path); 
        }
        if ($this->ch != '') { 
            curl_close ($this->ch);
        }
    }    
}

Aqui está o script de teste, os detalhes de login são para uma conta descartável, então sinta-se à vontade para testar com eles:

$curl = new Curl(md5(1));   //(md5($_SESSION['userId']));
$referer = 'http://ebay.co.uk';
$submit_url = "http://signin.ebay.co.uk/aw-cgi/eBayISAPI.dll";

$data['userid'] = "VitoGambino-us";
$data['pass'] = "P0wqw12vi";
$data['MfcISAPICommand'] = 'SignInWelcome';
$data['siteid'] = '0';
$data['co_partnerId'] = '2';
$data['UsingSSL'] = '0';
$data['ru'] = '';
$data['pp'] = '';
$data['pa1'] = '';
$data['pa2'] = '';
$data['pa3'] = '';
$data['i1'] = '-1';
$data['pageType'] = '-1';


$curl->curl_cookie_set($referer);
$result = $curl->curl_post_request($referer, $submit_url, $data);

echo $result;

Aqui está o conteúdo dos arquivos de cookie:

# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.

www.ebay.co.uk  FALSE   /   FALSE   0   JSESSIONID  BDE9B23B829CA7DF2CC4D5880F5173A6
.ebay.co.uk TRUE    /   FALSE   0   ebay    %5Esbf%3D%23%5Ecv%3D15555%5E
.ebay.co.uk TRUE    /   FALSE   1431871451  dp1 bu1p/QEBfX0BAX19AQA**53776c5b^
#HttpOnly_.ebay.co.uk   TRUE    /   FALSE   0   s   CgAD4ACBRl4pbYjJjZDk1YTAxM2UwYTU2YjYzYzRhYmU0ZmY2ZjcyODYBSgAXUZeKWzUxOTYzOGI5LjMuMS43LjY2LjguMC4xuMWzLg**
.ebay.co.uk TRUE    /   FALSE   1400335451  nonsession  CgADLAAFRlj/jMgDKACBa/DpbYjJjZDk1YTAxM2UwYTU2YjYzYzRhYmU0ZmY2ZjcyODcBTAAXU3dsWzUxOTYzOGI5LjMuMS42LjY1LjEuMC4xhVUTMQ**
.ebay.co.uk TRUE    /   FALSE   1526479451  lucky9  4551358

questionAnswers(1)

yourAnswerToTheQuestion