0

I'm trying to develop my first Client-Server project using Netbeans, whose task is to take news from various websites and then sending them to an Android App(client).

The Problem is, this is the first time i'm doing something like this. I've studied some examples of Client-Server interactions and I'm decently aware of how to write the code for both entities and then run them in the same machine (localhost).

But I haven't found any clear and simple documentation on the web about how to get data from a website and store it into my server.

I was thinking about creating a local database for the client side in which store all the news every time the user opens the android app and connects to the server, but that's something I think I can work on later.

What should be my first approach

Sarz
  • 1,970
  • 4
  • 23
  • 43
someCoder
  • 185
  • 3
  • 15

2 Answers2

0

if the site has a RSS Feed you could monitor the feed and store it in SQL

just an idea off the top of my head

Glenn Zealous
  • 72
  • 1
  • 7
  • That's actually the idea I had, the fact is I have no clue on how to write down the code. Could you please show me an example? Even a not working one, just a simple pseudo-code file – someCoder Mar 30 '16 at 09:32
  • http://stackoverflow.com/questions/23858119/parsing-rss-feed-using-php-to-insert-into-my-sql this should get you started – Glenn Zealous Mar 30 '16 at 09:37
0

You can have RSS e.g. Yahoo RSS. Simply download the file to the server. Use XML to parsing for the news and fetch data i.e. Title, Link, date.

Now, If you developing it for android. You have to create Stand-Alone application for it. Which will get the data parse it and display it.

If you want to store daily based news and facilitate user with previous news as well. You should ping Android application to your server and proceed accordingly.

You can store this data into Database (daily) and your client can see when ever he wants.

Sarz
  • 1,970
  • 4
  • 23
  • 43