는이 코드를 가지고 있지만 나는 미디어워드 프레스 피드 RSS XML - PHP 미디어
누군가가 나를 도울 수 받기 어떻게 몰라? 내 웹 사이트에 게시물의 이미지를 표시해야합니다
는
워드 프레스에 대한 내 PHP와 XML 아래는
PHP 피드
$html = "";
$url = "https://intercambioemgalway.com.br/feed/";
$xml = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA);
for ($i = 0; $i < 5; $i++){
$img = $xml->channel->item->media;
$html .= "$img";
}
echo $html;
XML
<item>
<title>Qual escola vou estudar?</title>
<link>https://intercambioemgalway.com.br/2017/09/11/qual-escola-estudar/</link>
<comments>https://intercambioemgalway.com.br/2017/09/11/qual-escola-estudar/#respond</comments>
<pubDate>Mon, 11 Sep 2017 17:36:59 +0000</pubDate>
<dc:creator><![CDATA[admin]]></dc:creator>
<category><![CDATA[Meu intercâmbio]]></category>
<guid isPermaLink="false">https://intercambioemgalway.com.br/?p=179</guid>
<description><![CDATA[<p>Hoje vou contar um pouquinho da escola que vou estudar em Galway, a Atlantic Language.</p>]]></description>
<wfw:commentRss>https://intercambioemgalway.com.br/2017/09/11/qual-escola-estudar/feed/</wfw:commentRss>
<slash:comments>0</slash:comments>
<media:content url="https://intercambioemgalway.com.br/wp-content/uploads/2017/09/Untitled-1.jpg" type="image/jpeg" medium="image" width="900" height="600">
<media:title type="plain">
<![CDATA[atlantic-language-galway]]>
</media:title>
<media:thumbnail url="https://intercambioemgalway.com.br/wp-content/uploads/2017/09/Untitled-1-150x150.jpg" width="150" height="150" />
<media:description type="plain">
<![CDATA[]]>
</media:description>
<media:copyright>
admin
</media:copyright>
</media:content>
추가 된 언어 형식의 태그 –