How do I take a live indice from the internet to display it on my personal webpage ? for eg. if i want to take live gold or oil price from a particular webpage ?
Well, you can connect to that page and read the HTML content into a variable and then parse it from the string. That is a very simplified explanation. It can be a lot more tricky, but that is the basic idea. I do something similar on one of my sites. I show deals from various websites and I have a clock that counts down until the end of the deal. I read the price and time left in the deal from the HTML of each particular deal site, so that I can display it on my site. gearsniper dot com.
You may find that the bigger sites will give you an xml feed or a javascript widget to use so long as you give them credit for the data.
If a site makes it available, they will offer a feed or an api. If they do not make it available and the page contains a copyright, then you are trying to steal copyright content, and when they detect what you are doing, they will block your site and may pursue legal action.
yeah other than scraping, you may be able to find some kind of api or feed that will provide the data more easily. i would think that there is probably something already out there that will give you a live quote, such as a stock price. I've done this before on a wordpress page using a plugin a long time ago.... assuming that is what you are trying to do.