A
A
Alexander Pankov2015-04-25 18:35:06
CMS
Alexander Pankov, 2015-04-25 18:35:06

How to get data from another site and store it in db?

Hello.
Do not tell me how to get information from another site.
I need to get the exchange rate for gold every 10 minutes and show it all on the site...
Specifically, the site www.forexpf.ru/chart/gold
is interested in the data of this table 6c4454591ca5414fbcc776117674a083.png
. use PHP.
I assume that PHP will somehow pull this data and save it to me in the database, and when the page is generated, the data from the database will be shown to the user ..
What is the action plan?
Thanks in advance for help

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rockman, 2015-04-25
@1Rockman

Get the page code for example like this
Then you study the source code of this page, find the necessary values, working with the code as with a regular string, search, delete, cut - parse in general, extracting the necessary data.

R
Rsa97, 2015-04-25
@Rsa97

cron runs the script periodically, it loads the page via curl or file_get_contents(), parses it and writes it to the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question