PHP code example of totara / simplepie
1. Go to this page and download the library: Download totara/simplepie library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
totara / simplepie example snippets
$simplepie = new \SimplePie\SimplePie();
$simplepie->set_http_client(
new \GuzzleHttp\Client(),
new \GuzzleHttp\Psr7\HttpFactory(),
new \GuzzleHttp\Psr7\HttpFactory(),
);
$simplepie = new \SimplePie\SimplePie();
$simplepie->set_cache(
new \Symfony\Component\Cache\Psr16Cache(
new \Symfony\Component\Cache\Adapter\FilesystemAdapter()
),
);