アットウィキロゴ

けいじばn

class pro{

String data,urlx,str1,str2,z,key;
String str3,str4;
int[] x=new int[10000];
int[] y=new int[10000];
String[] xml=new String[10000];
int s,xmlnumber;
int p3,p4;
int h;
int code,ycode;

public static void main(String [] args) {
        pro test=new pro();
            }

pro(){

code=1941;

urlx="http://messages.yahoo.co.jp/bbs?action=q&board=";
urlx=urlx+code;

getdata gt=new getdata();
gt.makedata(urlx);
data=gt.data;

xymaker(data);

xmlmaker(data);

str1="bbs";
str2="action=m";

for(s=1;s<xmlnumber-10;s++){
h=0;
if(xml[s].indexOf(str1)>0)h=h+1;
if(xml[s].indexOf(str2)>0)h=h+1;
if(h==2)z=xml[s];
}

System.out.println(z);

str3="tid=";
str4="&sid";

p3=z.indexOf(str3);
p4=z.indexOf(str4);

System.out.println(p3);
System.out.println(p4);

key=z.substring(p3,p4);

System.out.println(key);

ycode=1000000+code;

urlx="http://messages.yahoo.co.jp/bbs?.mm=FN&action=m&board=";
urlx=urlx+ycode;
urlx=urlx+"&";
urlx=urlx+key;
urlx=urlx+"&sid=";
urlx=urlx+ycode;
urlx=urlx+"&mid=100";



gt.makedata(urlx);
data=gt.data;

System.out.println(data);

}

void xmlmaker(String str){
int s,p1,p2;

for(s=1;s<xmlnumber-10;s++){
p1=x[s];
p2=y[s];
xml[s]=str.substring(p1+1,p2);
}

}
void xymaker(String str){
int p1;
int s;
s=1;
p1=str.indexOf("<");
x[1]=p1;
while(p1>-1){
p1=str.indexOf("<",p1+1);
if(p1>-1)s=s+1;
if(p1>-1)x[s]=p1;
}
xmlnumber=s;
for(s=1;s<xmlnumber+1;s++){
y[s]=str.indexOf(">",x[s]);
}

}

}
最終更新:2011年04月18日 20:56