Answer the question
In order to leave comments, you need to log in
Transferring value from one site to another?
Good afternoon, there is a website that contains the latest prices for distributors of goods.
We want to make a configurator using these prices.
On the site, the price itself is displayed in
a div there are:<div class="price-td">
<span data-currencyvalue="usd" class="js_price ">43.45</span>
<span data-currencysign="usd" class="js_sign ">$</span>
<div>
is in <td>
, and he is in turn in <tr id="5968892" class="">
<tr id="5968892" class="">
for the corresponding product, it has a table, it does not have a variable "price" with the value that we need to get. The question is how to display it on another site? Perhaps there is some kind of reference that can display the final variable as a number<div class="price-td">
<span data-currencyvalue="usd" class="js_price ">43.45</span>
and its equivalent<span data-currencysign="usd" class="js_sign "$/span>
. <div class="price-td">
located in the <tr id="5968892" class="">
<tbody data-ajaxupdate="rows"><tr id="5968891" class="">
<td>MOXA и ICP DAS</td>
<td>42895</td>
<td class="text-align-left-td product-title" title="Компьютер V2403-C3-T (CTO Models) x86 ready-to-run embedded computer with Intel Core i3 3217UE, 1 HD">Компьютер V2403-C3-T (CTO Models) x86 ready-to-run embedded computer with Intel Core i3 3217UE, 1 HD</td>
<td>#NULL!</td>
<!--<td></td>-->
<td>
<div class="price-td">
<span data-currencyvalue="usd" class="js_price ">37.59</span><span data-currencysign="usd" class="js_sign ">$</span>
<span data-currencyvalue="eur" class="js_price hidden">34.14</span><span data-currencysign="eur" class="js_sign hidden">€</span>
<span data-currencyvalue="rub" class="js_price hidden">2 414.10</span><span data-currencysign="rub" class="js_sign hidden">р.</span>
</div>
<!--<span data-currencyvalue="usd">37.59</span><span data-currencysign="usd">$</span>-->
</td>
<td>
<div class="diller">
<a href="authorization/registration.html" data-distributorid="33">Зарегистрироваться</a>
</div>
<i class="icon-refresh"></i> 11.10.2019
</td>
</tr><tr id="5968892" class="">
<td>MOXA и ICP DAS</td>
<td>42896</td>
<td class="text-align-left-td product-title" title="Компьютер V2403-C3-W-T (CTO Models) x86 ready-to-run embedded computer with Intel Core i3 3217UE, 1">Компьютер V2403-C3-W-T (CTO Models) x86 ready-to-run embedded computer with Intel Core i3 3217UE, 1</td>
<td>#NULL!</td>
<!--<td></td>-->
<td>
<div class="price-td">
<span data-currencyvalue="usd" class="js_price ">43.45</span><span data-currencysign="usd" class="js_sign ">$</span>
<span data-currencyvalue="eur" class="js_price hidden">39.45</span><span data-currencysign="eur" class="js_sign hidden">€</span>
<span data-currencyvalue="rub" class="js_price hidden">2 790.10</span><span data-currencysign="rub" class="js_sign hidden">р.</span>
</div>
<!--<span data-currencyvalue="usd">43.45</span><span data-currencysign="usd">$</span>-->
</td>
<td>
<div class="diller">
<a href="authorization/registration.html" data-distributorid="33">Зарегистрироваться</a>
</div>
<i class="icon-refresh"></i> 11.10.2019
</td>
</tr><tr id="6705631" class="">
<td>INTEL</td>
<td>BX80684I39100F S RF6N</td>
<td class="text-align-left-td product-title" title="Процессор Intel Original Core i3 9100F Soc-1151v2 (BX80684I39100F S RF6N) (3.6GHz) (плохая упаковка)">Процессор Intel Original Core i3 9100F Soc-1151v2 (BX80684I39100F S RF6N) (3.6GHz) (плохая упаковка)</td>
<td>0</td>
<!--<td></td>-->
<td>
<div class="price-td">
<span data-currencyvalue="usd" class="js_price ">100.81</span><span data-currencysign="usd" class="js_sign ">$</span>
<span data-currencyvalue="eur" class="js_price hidden">91.53</span><span data-currencysign="eur" class="js_sign hidden">€</span>
<span data-currencyvalue="rub" class="js_price hidden">6 473.75</span><span data-currencysign="rub" class="js_sign hidden">р.</span>
</div>
<!--<span data-currencyvalue="usd">100.81</span><span data-currencysign="usd">$</span>-->
</td>
<td>
Answer the question
In order to leave comments, you need to log in
TheDarhi , the regular season will certainly be strange, but it should work
Next run through preg_match_all
Alternatively, you need to parse the data and enter it into your database in order to display it on your site, unless of course the site from which you want to receive data does not have an API, but in this case it is better to add the data to your database and then display it, for a number of reasons, for example, there may be a limit on the number of calls to the API.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question