try
{
//Try to resolve the URL
IP aAddress;
aAddress=ResolveDNS(rWhoisServer.c_str());
//Do we have it
if (!aAddress)
{
//Report it
ReportError("WhoisURL","Failed to resolve whois server!");
//Exit
return FALSE;
}
//Set some data
m_bDone=FALSE;
m_bError=FALSE;
m_sWhoisData="";
m_sDataToSend=rURL;
m_sAdditionalWhoisServer="";
m_bAdditionalServer=rWhoisServer=="whois.crsnic.net";
//Try to connect
if (!Connect(aAddress,43))
{
//Report it
ReportError("WhoisURL","Failed to connect!");
//Not done
m_bDone=TRUE;
//We have errors
m_bError=TRUE;
//Exit
return FALSE;
}
//Are we async ?
if (!m_bAsync)
if (!SendURL(rURL))
{
//Report it
ReportError("WhoisURL","Failed to send data!");
//Not done
m_bDone=TRUE;
//We have errors
m_bError=TRUE;
//Exit
return FALSE;
}
else
return ReceiveWhois();
else
return TRUE;
}
ERROR_HANDLER_RETURN("WhoisURL",FALSE)