Merhaba arkadaşlar div içerisinde bulunan verileri alıyorum fakat sayfada bulunan schema içerisinden lowPrice almak istiyorum bunun için ne yapabilirim?
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"lowPrice": "50",
</script>
Yukarıda bulunan lowprice de almak istiyorum.
<div class="xxx">(.*?)<a href="(.*?)" title="(.*?)" class="xxx" data-id="(.*?)">(.*?)</div>
PHP Schema İçerisinden Veri Alma
2
●62
- 15-06-2021, 21:00:34Tam tersini niye yapmıyorsun
$context = array( "@context" => "https://schema.org", "@type" => "Product", "lowPrice" => "50", ); $scheme = "<script type='application/ld+json'>\n"; $scheme .= json_encode($context); $scheme .= "</script>\n"; echo $context['lowPrice']; echo $scheme