![]() |
GetAddressForWhois() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Public Function |
Declared in: WhoisSocket.h |
static std::string GetAddressForWhois( const std::string& rAddress);
Get an address for whois
try { //Get the vector AddressVector aVector; aVector=AnalyzeAddress(rAddress); //Do we have data if (aVector.begin()==aVector.end()) return ""; //Get the iterator AddressVector::const_iterator aIterator; aIterator=aVector.begin(); //Our address std::string sAddress; std::string sAddAddress; //Get the first one sAddress+=*aIterator; //Do we have the second one ? ++aIterator; if (aIterator==aVector.end()) return ""; //Add it sAddAddress=*aIterator; sAddAddress+='.'; sAddAddress+=sAddress; //What type is it if (!(*aIterator=="COM" || *aIterator=="NET" || *aIterator=="ORG" || *aIterator=="MIL" || *aIterator=="EDU" || *aIterator=="CO") || sAddress.length()==3) //Done return sAddAddress; //Another sub address ++aIterator; if (aIterator==aVector.end()) return ""; //This is the final address sAddress=*aIterator; sAddress+='.'; sAddress+=sAddAddress; //Done return sAddress; } ERROR_HANDLER_STATIC_RETURN(CWhoisSocket_Class,"GetAddressForWhois","")
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |