D
D
Dmitry2016-10-29 16:39:48
PHP
Dmitry, 2016-10-29 16:39:48

How to parse a price from a website into an image in php?

Hello dear!
I want to always display the current price of the product under discussion on the forum in the subject. The only thing that comes to mind is to parse it from the store page and display it as an image in the theme. Run the parsing script daily, and thus the picture will always have the current price.
I have my own server under Ubuntu with PHP7, on which the forum is located. Tell me how to implement price parsing and generate a picture with the corresponding number? There are several goods. There are some semi-finished solutions, since I myself understand PHP at the level of intuition (correct the finished one).
In the store, the price is displayed in the following html code:

...
<div class="product_prices product_details-prices" id="product_details-prices-12909" style="display: block;">
<div class="main_price">
<ul class="items-1">
<li class="price_retail_incl_vat">
<span class="label">
Цена Каталога
<span class="colon">: </span>
</span>
<span class="value">
<span class="money">543,00 RUR</span>
</span>
</li>
</ul>
</div>
...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question