Soru & Cevap

Siteden Belirli r alanı çekmek istiyorum App İnvertor ile ? ...

06.11.2015 - 10:10

Merhaba ; 

Uygulamama Webviewer ile sayfa verisi çekiyorum ama çok kasıyor (gereksiz yere sayfadaki bütün resimleri dahil ediyorum uygulamaya) o nedenle istediğim sayfadaki sadece yazı kısmını nasıl çekebilirim ? App inventor ile yapıldı uygulama.

3 Görüntülenme

1 Cevap

Sitedeki sorulara cevap verebilmek için giriş yapın ya da üye olun.

Profile picture for user ulasocal
ulasocal
08.11.2015 - 02:27
function getplaintextintrofromhtml($html, $numchars) {

    // Remove the HTML tags
    $html = strip_tags($html);

    // Convert HTML entities to single characters
    $html = html_entity_decode($html, ENT_QUOTES, 'UTF-8');

    // Make the string the desired number of characters
    // Note that substr is not good as it counts by bytes and not characters
    $html = mb_substr($html, 0, $numchars, 'UTF-8');

    // Add an elipsis
    $html .= "…";

    return $html;

}

Böyle bir function kullanarak sade metin çekebilirsin.