{"id":16631027,"url":"https://github.com/mehedimi/feed-reader","last_synced_at":"2025-03-11T18:57:39.312Z","repository":{"id":62526821,"uuid":"268219638","full_name":"mehedimi/feed-reader","owner":"mehedimi","description":"A simple rss and atom feed reader","archived":false,"fork":false,"pushed_at":"2020-06-08T13:28:07.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-18T06:28:44.237Z","etag":null,"topics":["atom","atom-feed","feed","laravel-rss-feed","rss","rss-feed","rss-feed-scraper"],"latest_commit_sha":null,"homepage":"https://github.com/mehedimi/feed-reader","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mehedimi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-31T06:05:36.000Z","updated_at":"2020-08-03T06:06:07.000Z","dependencies_parsed_at":"2022-11-02T10:45:35.794Z","dependency_job_id":null,"html_url":"https://github.com/mehedimi/feed-reader","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehedimi%2Ffeed-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehedimi%2Ffeed-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehedimi%2Ffeed-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehedimi%2Ffeed-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehedimi","download_url":"https://codeload.github.com/mehedimi/feed-reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243095795,"owners_count":20235546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom","atom-feed","feed","laravel-rss-feed","rss","rss-feed","rss-feed-scraper"],"created_at":"2024-10-12T04:50:34.434Z","updated_at":"2025-03-11T18:57:39.292Z","avatar_url":"https://github.com/mehedimi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Feed Reader\nA simple feed reader\n## Installation\n```bash\n$ composer require mehedimi/feed-reader\n```\n## Basic Uses:\n\n```php\n\u003c?php\n    $feed = new \\Mehedi\\Feed();\n    // Reading RSS Feed\n    $rss = $feed-\u003erss('http://your-url.com/rss')\n                -\u003eread();\n   \n    echo $rss-\u003egetTitle(); // Get the channel title\n\n    // Access channel extra field\n    echo $rss-\u003echannel()-\u003eextra;\n    \n    foreach ($rss-\u003eitems() as $item) {\n        echo $item-\u003etitle; // Get the item title\n        // Accessing attribute\n        echo $item-\u003etitle-\u003eattributes()-\u003eattributeName;\n    }\n\n    // Reading Atom Feed\n\n    $atom = $feed-\u003eatom('http://your-url.com/atom')\n                 -\u003eread();\n    \n    echo $atom-\u003egetTitle(); // Title\n    echo $atom-\u003egetUpdated()-\u003eformat('d F, Y'); // Last Updated Date\n\n    // Access channel extra field\n    echo $atom-\u003efeed()-\u003eextra;\n\n    foreach ($atom-\u003eentries() as $entry) {\n        echo $entry-\u003etitle; // Get the item title\n        // Accessing attribute\n        echo $entry-\u003etitle-\u003eattributes()-\u003eattributeName;\n    }\n```\n\n## Authentication\n\nIf your feed resource are protected by HTTP Basic Auth then you can use `basicAuth` \n```php\n\u003c?php\n\n$feed = new \\Mehedi\\Feed();\n\n$feed-\u003erss('url')\n     -\u003ebasicAuth('username', 'password')\n     -\u003eread();\n// OR\n$feed-\u003eatom('url')\n     -\u003ebasicAuth('username', 'password')\n     -\u003eread();\n```\n\n## With Laravel\n\n```php\n\u003c?php\n    // Just use Feed Facade\n    $rss = \\Mehedi\\Facades\\Feed::rss('url')-\u003eread();\n  \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehedimi%2Ffeed-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehedimi%2Ffeed-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehedimi%2Ffeed-reader/lists"}