خرید بک لینک
Hello all,

I have a script:
PHP Code:

            <?php
            $i 
0// counter
            
$name 'Rainbowstar';
            
$url "http://rainbowstar.pl/category/aktualnosci-pl/feed/"// url to parse
            
$rss simplexml_load_file($url); // XML parser

            // RSS items loop

            
foreach($rss->chael->item as $item) {
            if (
$i 5) { // parse only 10 items
            
echo '<a href="'.$item->link.'" target="_blank"><img class="news_feed_img" title="'.$item->title.'" src="'.[B]$item->enclosure['url'][/B].'"</a>';
            echo 
'<p class="news_title"><a href="'.$item->link.'" target="_blank">'.$item->title.'</a></p>';

            
$clean_desc strip_tags ($item->description);
            
$desc_max substr($clean_desc0200);
            
$desc_min substr($desc_max0strrpos($desc_max' ')).' (...)';
            echo 
'<p class="news_description">'.$desc_min.'</p>';
            echo 
'<p class="news_info"><span class="news_source_name">'.$name.'</span>&nbsp;&nbsp;&nbsp;<span class="news_data">'.$item->pubDate.'</span></p>';    
            echo 
'<hr class="news_hr">';
            }
            
$i++;
            }
            
?>

and the source url with a fragment, where image url is in <content:encoded><![CDATA[ section:

Code:

<content:encoded><![CDATA[<p style="text-align: justify;"><strong>Powiedzmy wprost: (...) ektowne</em> x96 mówi Jakub.</p>
<p style="text-align: justify;"><img class="aligncenter size-full wp-image-14964" src="https://blog.refform.pl//blogupload/2017/09/przemoc_2a.jpg" alt="" width="810" height="350" /></p>
<p style="text-align: justify;">x96 <em>Badania wykaz (...)

Output is correct, but without images corresponding to each text:

Click image for larger version. 

Name:	przyklad.JPG 
Views:	11 
Size:	39.9 KB 
ID:	17458

May I ask You about help? How should I to change the code for correct working? I will be very gratefull for Your help.4

Darek
Attached Thumbnails
Click image for larger version. 

Name:	przyklad.JPG 
Views:	N/A 
Size:	39.9 KB 
ID:	17458  

برچسب: نویسنده: آیلین رضوانی تاريخ: جمعه 7 مهر 1396 ساعت: 10:54

صفحه بندی