public function checkConnection()
{
$connection = false;
$urls = array();
$urls[] = new \Oara\Curl\Request("https://classic." . $this->_domain . '/affiliate/view_edit_auth_key.php', array());
$result = $this->_client->get($urls);
if (\preg_match("/<p><strong>Affiliate ID:<\\/strong> (.*)?<\\/p>/", $result[0], $matches)) {
$this->_id = $matches[1];
if (\preg_match("/<p><strong>API Authorization Key:<\\/strong> (.*)?<\\/p>/", $result[0], $matches)) {
$this->_apikey = $matches[1];
$connection = true;
}
}
return $connection;
}