{"id":19308598,"url":"https://github.com/sparkinzy/redis-bloom-filter","last_synced_at":"2025-04-22T13:32:20.955Z","repository":{"id":57021668,"uuid":"224121382","full_name":"Sparkinzy/redis-bloom-filter","owner":"Sparkinzy","description":"redis布隆过滤器 php版","archived":false,"fork":false,"pushed_at":"2020-01-10T05:49:06.000Z","size":7,"stargazers_count":6,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T00:11:51.607Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Sparkinzy.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":"2019-11-26T06:44:35.000Z","updated_at":"2022-11-15T08:41:51.000Z","dependencies_parsed_at":"2022-08-23T13:50:55.485Z","dependency_job_id":null,"html_url":"https://github.com/Sparkinzy/redis-bloom-filter","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/Sparkinzy%2Fredis-bloom-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sparkinzy%2Fredis-bloom-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sparkinzy%2Fredis-bloom-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sparkinzy%2Fredis-bloom-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sparkinzy","download_url":"https://codeload.github.com/Sparkinzy/redis-bloom-filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250248766,"owners_count":21399333,"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":[],"created_at":"2024-11-10T00:15:40.228Z","updated_at":"2025-04-22T13:32:20.713Z","avatar_url":"https://github.com/Sparkinzy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e bloomfilter \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e redsi布隆过滤器.\u003c/p\u003e\n\n\n## Installing\n\n```shell\n$ composer require mu/bloomfilter -vvv\n```\n\n## Usage\n使用场景：\n- 判断ip是否需要拦截\n- 判断用户是否为会员\n\n\n\n```php\nuse Mu\\Bloomfilter\\BloomFilter;\n\n# redis服务器\n$redis_conf = [\n    'host' =\u003e '127.0.0.1',\n    'port' =\u003e 6379,\n    'auth' =\u003e 'beauty',\n    'timeout'  =\u003e 1,\n    'database' =\u003e0\n];\n\n$bloomfilter = new BloomFilter($redis_conf);\n# 设置评论的空间\n$bloomfilter-\u003eset_bucket('black_ips');\n# 添加一个ip\n$ip = '127.0.0.1';\n$add_rs = $bloomfilter-\u003eadd($ip);\n# 批量添加\n$ips = ['192.168.0.1','192.168.0.2'];\n$adds_rs = $bloomfilter-\u003emulti_add($ips);\n\n# 检查ip\n$rs = $bloomfilter-\u003eexists($ip);\n\n# 批量检查ip\n$multi_rs = $bloomfilter-\u003emulti_exists($ips);\n\n\n```\n\n## Contributing\n\nYou can contribute in one of three ways:\n\n1.  [胡超博客](http://imhuchao.com/1271.html).\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkinzy%2Fredis-bloom-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparkinzy%2Fredis-bloom-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkinzy%2Fredis-bloom-filter/lists"}