26 lines
498 B
PHP
26 lines
498 B
PHP
<?php
|
|
|
|
namespace App\Api;
|
|
|
|
/**
|
|
* class TTRssClient.
|
|
*
|
|
* @author Simon Vieille <simon@deblan.fr>
|
|
*/
|
|
class TTRssClient
|
|
{
|
|
public function getPager(int $page = 1): array
|
|
{
|
|
$result = @file_get_contents('https://tiny.deblan.org/deblan_api/?page='.$page);
|
|
|
|
if ($result) {
|
|
$result = str_replace('\\u0092', "'", $result);
|
|
$result = str_replace(''', "'", $result);
|
|
|
|
return json_decode($result, true);
|
|
}
|
|
|
|
return [];
|
|
}
|
|
}
|