Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Open a URL, scan the page(look for certain words)

Posted on 2003-12-04
3
Medium Priority
?
277 Views
Last Modified: 2010-04-17
Hi

In java, how can I open an URL eg. http://www.google.com , then read that page meaning
search for certain words..and if those words exist I would output a message.

SB

0
Comment
Question by:ScarletBlue
3 Comments
 
LVL 2

Accepted Solution

by:
override_y2k earned 60 total points
ID: 9876661
Do something like

String url = "http://yahoo.com

Then use javas openURL command to open it

........
    try {
    someutility.openURL(url);
    return;      
    }
........            

Also you will need to catch various exceptions.Then create a search tool that searches the page for a given word.

......
if(wordpresent = true) {
  System.out.println("Word is present");
}
....

Regards.

O2K
0
 

Author Comment

by:ScarletBlue
ID: 10319544
Hi CleanupPing
I have already accepted O2K's answer. It's written "Accepted Answer " in green. Please
confirm this.
thanx
scarlet
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Make the most of your online learning experience.
Starting up a Project
Screencast - Getting to Know the Pipeline

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question