Results 1 to 6 of 6
- 02-07-2012, 12:21 PM #1
Member
- Join Date
- Feb 2012
- Posts
- 2
- Rep Power
- 0
code to refresh and check the code of a webpage..
Hi,
I would like to create a code, which will refresh a web page every a time period and after every refresh to check its code in order to find a string. if it finds this string more than 1 time, to inform me with a message or a sound.
Is it possible..?
thanks in advance
- 02-07-2012, 01:32 PM #2
Re: code to refresh and check the code of a webpage..
Yes, it is possible.
- 02-07-2012, 01:39 PM #3
Member
- Join Date
- Dec 2011
- Location
- Croatia,Zagreb
- Posts
- 21
- Rep Power
- 0
Re: code to refresh and check the code of a webpage..
Hi vaggelis.
As already Norm say'd, yes it is possible.
Since u have to check every xx time something, u can use Thread (Java 2 Platform SE v1.4.2).
and for reading from website u can google some solution or here is one:
if u got some clever project, we can do it together since i have a lot free time :)Java Code:// code c+p from http://snippets.dzone.com/posts/show/3553 import java.io.*; import java.net.URL; public class WebsiteReader { public static BufferedReader read(String url) throws Exception{ return new BufferedReader( new InputStreamReader( new URL(url).openStream()));} public static void main (String[] args) throws Exception{ BufferedReader reader = read(args[0]); String line = reader.readLine(); while (line != null) { System.out.println(line); line = reader.readLine(); }} }
Good luck.
- 02-07-2012, 01:43 PM #4
Re: code to refresh and check the code of a webpage..
Cross posted at code to refresh and check the code of a webpage..
- 02-07-2012, 02:19 PM #5
Member
- Join Date
- Feb 2012
- Posts
- 2
- Rep Power
- 0
Re: code to refresh and check the code of a webpage..
thank you a lot..
Norm, could you be more specific..?
- 02-07-2012, 02:21 PM #6
Similar Threads
-
can someone check my code plz
By aizen92 in forum New To JavaReplies: 20Last Post: 02-21-2011, 01:19 AM -
Code to check if a piece of code is legal.
By vahshir in forum New To JavaReplies: 3Last Post: 08-30-2010, 04:21 AM -
jsp code for Refresh inputext previous value
By ajay kumar in forum JavaServer Pages (JSP) and JSTLReplies: 3Last Post: 11-13-2009, 11:31 AM -
Plz Some one check my code
By TamTam in forum AWT / SwingReplies: 1Last Post: 02-07-2009, 11:24 PM -
Can someone check my code
By joz_12345 in forum Java 2DReplies: 7Last Post: 02-18-2008, 02:58 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks