Does anyone know how you can possibly read an external webpage or search it for an exact expression or image. If it exists return an alertbox "found, otherwise "not found"
Javascript would be great. I found this example but cant seem to make it work.
URL url = new URL("http://factfinder.cens us.gov/home/saff/main.html?_lang =en");
HttpURLConnecti on conn = (HttpURLConnect ion) url.openConnect ion();
BufferedReader rd = new BufferedReader( new InputStreamRead er(conn.getInpu tStreamReader() );
String line;
while(line=rd.r eadLine() != null) {
response += line;
}
if (line == "2006 County Business Patterns"){
alert ('found');
}else{
alert ('not found');
}
</script>
any examples or help would be appreciated...
Javascript would be great. I found this example but cant seem to make it work.
URL url = new URL("http://factfinder.cens us.gov/home/saff/main.html?_lang =en");
HttpURLConnecti on conn = (HttpURLConnect ion) url.openConnect ion();
BufferedReader rd = new BufferedReader( new InputStreamRead er(conn.getInpu tStreamReader() );
String line;
while(line=rd.r eadLine() != null) {
response += line;
}
if (line == "2006 County Business Patterns"){
alert ('found');
}else{
alert ('not found');
}
</script>
any examples or help would be appreciated...
Comment