{"id":17274293,"url":"https://github.com/arifszn/reddit-image-fetcher-php","last_synced_at":"2025-04-14T08:53:16.096Z","repository":{"id":56194482,"uuid":"299008159","full_name":"arifszn/reddit-image-fetcher-php","owner":"arifszn","description":"A PHP package for fetching reddit images, memes, wallpapers and more.","archived":false,"fork":false,"pushed_at":"2023-06-18T12:22:49.000Z","size":5324,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T22:23:12.997Z","etag":null,"topics":["memes","reddit","reddit-api","wallpapers"],"latest_commit_sha":null,"homepage":"https://arifszn.github.io/reddit-image-fetcher-php","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/arifszn.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-09-27T10:34:43.000Z","updated_at":"2024-06-15T15:16:06.000Z","dependencies_parsed_at":"2022-08-15T14:30:49.651Z","dependency_job_id":null,"html_url":"https://github.com/arifszn/reddit-image-fetcher-php","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arifszn%2Freddit-image-fetcher-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arifszn%2Freddit-image-fetcher-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arifszn%2Freddit-image-fetcher-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arifszn%2Freddit-image-fetcher-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arifszn","download_url":"https://codeload.github.com/arifszn/reddit-image-fetcher-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852107,"owners_count":21171839,"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":["memes","reddit","reddit-api","wallpapers"],"created_at":"2024-10-15T08:53:34.974Z","updated_at":"2025-04-14T08:53:16.066Z","avatar_url":"https://github.com/arifszn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://arifszn.github.io/reddit-image-fetcher-php\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://arifszn.github.io/reddit-image-fetcher-php/img/logo/logo.png\" alt=\"Reddit Image Fetcher\" title=\"Reddit Image Fetcher\" width=\"80\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eReddit Image Fetcher\u003c/h1\u003e\n\u003cp align=\"center\"\u003eA PHP package for fetching reddit images, memes, wallpapers and more.\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ca href=\"https://arifszn.github.io/reddit-image-fetcher-php\"\u003ehttps://arifszn.github.io/reddit-image-fetcher-php\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://packagist.org/packages/arifszn/reddit-image-fetcher\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/arifszn/reddit-image-fetcher\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/arifszn/reddit-image-fetcher-php/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/arifszn/reddit-image-fetcher-php\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://arifszn.github.io/reddit-image-fetcher-php\"\u003e\n    \u003cimg src=\"https://arifszn.github.io/reddit-image-fetcher-php/img/preview.gif\" width=\"60%\" alt=\"Preview\"/\u003e\n  \u003c/a\u003e\n  \u003cbr/\u003e\n  \u003ca href=\"#arifszn\"\u003e\u003cimg src=\"https://arifszn.netlify.app/assets/img/drop-shadow.png\" width=\"60%\" alt=\"Shadow\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n- Bulk images\n- Bulk memes\n- Bulk wallpapers\n- Customizable\n- Lightweight\n- Zero dependency\n\n\u003e JavaScript version: \u003ca href=\"https://github.com/arifszn/reddit-image-fetcher\"\u003eReddit Image Fetcher\u003c/a\u003e\n\n## Resources\n\n- [Demo](https://memedb.netlify.app)\n- [Documentation](https://arifszn.github.io/reddit-image-fetcher-php)\n\n## Installation\n\nInstall via \u003ca href=\"https://packagist.org/packages/arifszn/reddit-image-fetcher\"\u003ecomposer\u003c/a\u003e\n\n```\ncomposer require arifszn/reddit-image-fetcher\n```\n\n## Usage\n\n```php\nuse arifszn\\RedditImageFetcher\\RedditImageFetcher;\n\n\n$redditImageFetcher = new RedditImageFetcher();\n    \n$result = $redditImageFetcher-\u003efetch('meme'); // fetch 1 meme\n$result = $redditImageFetcher-\u003efetch('wallpaper'); // fetch 1 wallpaper\n\n$result = $redditImageFetcher-\u003efetch('wallpaper', 50); // fetch 50 wallpapers\n    \n// custom image fetch from given subreddits\n$result = $redditImageFetcher-\u003efetch(\n    'custom',\n    50, \n    ['cats', 'Catswhoyell', 'sleepingcats']\n); // fetch 50 cat images from custom subreddit library\n \n$result = $redditImageFetcher-\u003efetch(\n    'meme',\n    50,\n    [],\n    ['memes', 'funny'],\n    ['dankmemes']\n); // fetch 50 memes by adding two subreddits and removing 1 subreddit from default subreddit library\n\n```\n\n## Sample Response\n\n```php\narray:2 [▼\n  0 =\u003e array:10 [▼\n    \"id\" =\u003e \"hfh51v\"\n    \"type\" =\u003e \"wallpaper\"\n    \"title\" =\u003e \"Illuminated City at Night [1920 x 1200]\"\n    \"postLink\" =\u003e \"https://redd.it/hfh51v\"\n    \"image\" =\u003e \"https://i.redd.it/b6x9i2n830751.jpg\"\n    \"thumbnail\" =\u003e \"https://b.thumbs.redditmedia.com/mLCk8Bh0N4M8hZafHsbAmw8rM7JEEznsT2nRZSo3GsU.jpg\"\n    \"subreddit\" =\u003e \"wallpaper\"\n    \"NSFW\" =\u003e false\n    \"spoiler\" =\u003e false\n    \"createdUtc\" =\u003e 1593066557.0\n    \"upvotes\" =\u003e 1899\n    \"upvoteRatio\" =\u003e 1.0\n  ]\n  1 =\u003e array:10 [▼\n    \"id\" =\u003e \"h9glhi\"\n    \"type\" =\u003e \"wallpaper\"\n    \"title\" =\u003e \"Missing Home by Just Jaker\"\n    \"postLink\" =\u003e \"https://redd.it/h9glhi\"\n    \"image\" =\u003e \"https://cdnb.artstation.com/p/assets/images/images/027/020/665/large/just-jaker-galax-noise.jpg\"\n    \"thumbnail\" =\u003e \"https://b.thumbs.redditmedia.com/4utBLNbsIDDLl46z494PCRkDhmAnapQq9FL7l-07aJo.jpg\"\n    \"subreddit\" =\u003e \"ImaginaryFuturism\"\n    \"NSFW\" =\u003e false\n    \"spoiler\" =\u003e false\n    \"createdUtc\" =\u003e 1592228591.0,\n    \"upvotes\" =\u003e 462\n    \"upvoteRatio\" =\u003e 1.0\n  ]\n]\n```\n\n\n## Options\n\n| Property            |  Type   | Description                                               | Default |\n| :-----------        | :---:   | :-------------------------------------                    | :----:  |\n| type               | string  | \u003ccode\u003e'meme'\u003c/code\u003e \\| \u003ccode\u003e'wallpaper'\u003c/code\u003e \\| \u003ccode\u003e'custom'\u003c/code\u003e | \u003ccode\u003e'meme'\u003c/code\u003e       |\n| total               | int  | How many images to get. Max is 50                         | \u003ccode\u003e1\u003c/code\u003e       |\n| subreddit        | array   | Custom subreddit libray                    |   \u003ccode\u003e[ ]\u003c/code\u003e   |\n| addSubreddit        | array   | Add subreddits to subreddit library                    | \u003ccode\u003e[ ]\u003c/code\u003e     |\n| removeSubreddit     | array   | Remove subreddits from subreddit library               | \u003ccode\u003e[ ]\u003c/code\u003e     |\n\n\n## Contribute\n\nTo contribute, clone this repo locally and commit your code on a new branch. Feel free to create an issue or make a pull request.\n\n\n## Thank You\n\n[![Stargazers repo roster for @arifszn/reddit-image-fetcher-php](https://reporoster.com/stars/arifszn/reddit-image-fetcher-php)](https://github.com/arifszn/reddit-image-fetcher-php/stargazers)\n\n\n## Support\n\nShow your ❤️ and support by giving a ⭐.\n\n## License\n\n**Reddit Image Fetcher** is licensed under the [MIT License](https://github.com/arifszn/reddit-image-fetcher-php/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farifszn%2Freddit-image-fetcher-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farifszn%2Freddit-image-fetcher-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farifszn%2Freddit-image-fetcher-php/lists"}