main(){long ip;char soc,*b,*m,*h,*w,*d;h="dic.yahoo.co.jp";
m="description";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 /dsearch?p=");StrCat(b,w);
StrCat(b,"&stype=1&dtype=1 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))break;}
d=StrStr(b,w);if(d){*(d+StrLen(d)-2)=0;PrStr(d+StrLen(w)+1);
PrStr("\r\n");}GetNetLine(0,0,0,1);CloseSocket(soc);}
MemoryFree(w);MemoryFree(b);}
