10-20-2009, 08:36 AM
This is definitely a lot more stable.
Function AnyWho_Lookup2
Is there anything else you could recommend to do to make this code better? It's looking pretty short now
Thanks,
jimmy Vig
Function AnyWho_Lookup2
function ARRAY(str)&ReturnInformation [str'First] [str'Last] [str'State] [str'City] [str'Zip]
str AnyWhoURL.format("http://whitepages.anywho.com/results.php?&qc=%s&qf=%s&qn=%s&qs=%s&qz=%s&qi=0&qk=100" City First Last State Zip)
HtmlDoc d.InitFromWeb(AnyWhoURL)
ARRAY(str) a Entry Information
d.GetTable(12 a 0 1)
int j
for j 0 a.len
,if(matchw(a[j] "<TABLE class=resultTable*"))
,,goto Populate
,if(matchw(a[j] "*<SPAN class=singleName*"))
,,goto Populate
,,;Populate
,,int flag=1
,,d.InitFromText(a[j])
,,d.GetTable(0 Entry)
,,tok(Entry[0] Information 4 "[]" 16)
,,str& entry=ReturnInformation[];entry.from(Information[0])
,,&entry=ReturnInformation[];entry.from(Information[1])
,,&entry=ReturnInformation[];entry.from(Information[2])
,,&entry=ReturnInformation[];entry.from(Information[3])
,,&entry=ReturnInformation[];entry.from("----------")
if flag=1;ret
_s=Information;_i=val(_s);if _i=0;out "No Matches";ret
retIs there anything else you could recommend to do to make this code better? It's looking pretty short now

Thanks,
jimmy Vig
