PHP code example of sbuckpesch / medium-php-reader
1. Go to this page and download the library: Download sbuckpesch/medium-php-reader 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/ */
sbuckpesch / medium-php-reader example snippets
$medium = new Medium( '@sbuckpesch' );
$posts = $medium->getPosts();
foreach ( $posts as $post ) {
$data = $post->toArray();
echo $post->getPreviewImage( 600 );
echo date( 'd F Y', $post->getPublishedAt() / 1000 );
}