I try to get some infos from another website and ı can get product name but ı can’t get Stock Name.
this is the website div element whichone is ı want to get infos
<div class="col-xl-5 offset-xl-1 col-lg-6 order-3">
<div class="product-right">
<div class="product-brand">
<a href="/marka/kaly">Kaly</a>
</div>
<div class="product-title">
<h1>Yamaha MT 25 Stop Komple Ledli Bluetoothlu (Kayar Sinyalli)</h1>
</div>
<div class="product-sku">Stok Kodu : KM11855-B04</div>
<div class="product-price">
<div class="price-text">
<div class="product-price-old">
2.550,30 <span>₺</span>
</div>
</div>
</div>
I can get product-band ‘kaly’ with this code :
$urun_parcala=explode('<a href="/marka/',$site);
$urun_parcala2=explode('"',$urun_parcala[1]);
return $urun_parcala2[1];
but I cant get product-sku with this code :
$fgc_urun=file_get_contents("https://www.kalyoncumotor.com/urun/yamaha-mt-25-stop-komple-ledli-kayar-sinyalli");
$urun_parcala=explode('<div class="product-sku">',$fgc_urun);
$urun_parcala2=explode('</d',$urun_parcala[0]);
print_r($urun_parcala2);