retrieving info from a website


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: retrieving info from a website

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Posts
    1

    retrieving info from a website

    does anybody know how i would go about retrieving info from a website, using java, then placing it in a database. i can make a mock website for the project.

    wud the using the URLReader class be going in the right direction

    public class URLReader {
    public static void main(String[] args) throws Exception {
    URL yahoo = new URL("http://www.yahoo.com/");
    BufferedReader in = new BufferedReader(
    new InputStreamReader(
    yahoo.openStream()));

    String inputLine;

    while ((inputLine = in.readLine()) != null)
    System.out.println(inputLine);

    in.close();
    }
    }

    any help wu be much appreciated

  2. #2
    Join Date
    Mar 2005
    Location
    UK, London
    Posts
    150
    Hi, the following link has a download on how to read data from a web site.
    http://www.java.codeyourself.com/Download.php?ID=37

    this next link, has a few downloads on how to get connected to a database. You need to know some SQL to be able to insert the data from the web site into your database

    http://www.java.codeyourself.com/Cat...egory=Database

    Hope it helps.

  3. #3
    Join Date
    Feb 2006
    Location
    Cologne - Germany
    Posts
    271
    Well, when you use the url class you will have to handle the http protocol headers.
    An easier approach is to use the httpclient by apache, which supports a lot of features, like https, proxies, and so on. there are also several examples of usage on the page.

Similar Threads

  1. Retrieving file properties summery info
    By Sandaruwan Wijenayake in forum ASP.NET
    Replies: 0
    Last Post: 07-25-2002, 09:41 AM
  2. Replies: 3
    Last Post: 03-07-2001, 11:22 PM
  3. Retrieving Installed Software Info from Registry
    By John Nelson in forum VB Classic
    Replies: 4
    Last Post: 11-06-2000, 01:34 PM
  4. Retrieving Installed Software Info from Registry
    By John Nelson in forum VB Classic
    Replies: 0
    Last Post: 11-06-2000, 01:09 AM
  5. retrieving info from exchange
    By Ashley in forum Enterprise
    Replies: 2
    Last Post: 05-02-2000, 12:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center