main(){long ip;char soc,*b,*m,*n,*h,*w;h="whois.jprs.jp";
m="[\223\157\230\136\216\322\226\274]";n="[\221\147\220\104\226\274]";
ip=GetHostByName(h);if(!ip){PrStr("Host?\r\n");return;}
b=MemoryAlloc(256);w=MemoryAlloc(80);
for(;;){PrStr("Enter word=");Gets(w,80);if(!*w)break;
soc=CreateSocket(1);if(Connect(soc,ip,80)<0){CloseSocket(soc);break;}
GetNetLine(0,0,0,0);StrCpy(b,"GET /cgi-bin/whois_gw?key=");StrCat(b,w);
StrCat(b," HTTP/1.1\r\nHost: ");StrCat(b,h);StrCat(b,"\r\n\r\n");
Write(soc,b,StrLen(b));WaitWriteComplete(soc);for(;;)
{if(GetNetLine(soc,b,250,20)<0)break;if(StrStr(b,m)||StrStr(b,n))break;}
PrStr(b);PrStr("\r\n");GetNetLine(0,0,0,1);CloseSocket(soc);}
MemoryFree(w);MemoryFree(b);}
