void SetMYIP()

{

            struct sockaddr_in to;

            struct hostent * hp;

            char MyName[80];

            gethostname(MyName,80);

            hp = gethostbyname(MyName);

            memcpy(&(to.sin_addr),hp->h_addr,hp->h_length);

            strcpy(MYIP,inet_ntoa(to.sin_addr));

}