void GetHTMLpage(char *ip,int port, char *host, char *url,char *cookie, char *answer)
{
int getlen=0;
char request[2048]="\0";
char response[10000]="\0";
strcpy(response,"");
sprintf(request,"GET %s HTTP/1.1\r\nHost: %s\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5\r\nCookie: %s\r\nAccept: text/html\r\nConnection: Close\r\n\r\n", url, host,cookie);
SOCKET s;
sockaddr_in s_a;
s_a.sin_addr.s_addr=inet_addr((const char*)ip);
s_a.sin_port = htons(port);
s_a.sin_family = AF_INET;
s=socket(AF_INET,SOCK_STREAM,0);
int sf;
sf=connect(s,(struct sockaddr*)&s_a,sizeof(s_a));
sf=send(s,request,strlen(request),0);
do
{
sf=recv(s,&response[0],9995,0);
strcat(answer,response);
Sleep(1000);
}while(sf>0);
closesocket(s);
}