On the site you need to insert currency rates. Data comes from another site (not web-service). There on the site they are on a specific div. Question: how to download this div to my site so that when loading the page the courses are synchronized?
2 answers
Do this type
$url = file_get_contents(http://bla-bla.bla); preg_match("/<div.*?>(.*?)<\/div>/is", $url, $resul); print_r($resul);
In <div.*?>
Register the main for example ID diva. Bring all this print_r($resul);
and see the result
|
Using the file_get_contents(URL)
you can get the html-code of the page. And from it you can already get the div code and, if necessary, process it and write the necessary values in the database.
|