mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-18 15:01:39 +00:00
23 lines
656 B
PHP
23 lines
656 B
PHP
<?php
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
use Curl\Curl;
|
|
|
|
$curl = new Curl();
|
|
$curl->get('https://backend.deviantart.com/rss.xml', [
|
|
'q' => 'boost:popular in:photography/people/fashion',
|
|
'type' => 'deviation',
|
|
]);
|
|
|
|
foreach ($curl->response->channel->item as $entry) {
|
|
$thumbnails = $entry->children('http://search.yahoo.com/mrss/')->thumbnail;
|
|
foreach ($thumbnails as $thumbnail) {
|
|
$img = $thumbnail->attributes();
|
|
echo
|
|
'<a href="' . $entry->link . '">' .
|
|
'<img alt="" src="' . $img->url . '" height="' . $img->height . '" width="' . $img->width . '" />' .
|
|
'</a>';
|
|
}
|
|
}
|