{"id":16410539,"url":"https://github.com/skipperbent/pecee-spam-validator","last_synced_at":"2026-05-12T23:07:35.887Z","repository":{"id":57037413,"uuid":"69403347","full_name":"skipperbent/pecee-spam-validator","owner":"skipperbent","description":"Extremely simple and lightweight PHP spam validator class to add an small additional layer of security.","archived":false,"fork":false,"pushed_at":"2016-10-17T00:24:16.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-15T05:46:56.793Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skipperbent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-27T22:18:42.000Z","updated_at":"2016-09-27T22:23:39.000Z","dependencies_parsed_at":"2022-08-23T21:00:16.347Z","dependency_job_id":null,"html_url":"https://github.com/skipperbent/pecee-spam-validator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/skipperbent/pecee-spam-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skipperbent%2Fpecee-spam-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skipperbent%2Fpecee-spam-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skipperbent%2Fpecee-spam-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skipperbent%2Fpecee-spam-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skipperbent","download_url":"https://codeload.github.com/skipperbent/pecee-spam-validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skipperbent%2Fpecee-spam-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32960368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T09:19:52.626Z","status":"ssl_error","status_checked_at":"2026-05-12T09:17:33.438Z","response_time":102,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-11T06:43:14.016Z","updated_at":"2026-05-12T23:07:35.870Z","avatar_url":"https://github.com/skipperbent.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pecee Spam Validator class\n\nSmall lightweight class for providing an extremely simple layer of spam-security using moinmo.in's list of blacklisted spam words.\n\n**Note:** this class will not prevent spam 100% and should only be used to add some additional security when validating the contents of your input-fields on your webste.\n\n## Installation\n\nInstall this module by running the following composer command:\n\n```composer require pecee/spam-validator```\n\n## Usage\n\n```php\n$comment = $_POST['comment'];\n$service = new \\Pecee\\Service\\SpamChecker();\n\nif($service-\u003eisSpam($comment)) {\n    // Comment contains spam\n} else {\n    // Continue...\n}\n```\n\nIf no path to a spam-list is defined, the class will try to fetch the latest version from http://master.moinmo.in/BadContent?action=raw.\n\nPlease store the list locally to avoid calling moinmo.in on each request.\n\n## Methods\n\n#### setPathToSpamList($path)\n\nSet path to local spam-list.\n\n**Example:**\n\n```php\n$service = new \\Pecee\\Service\\SpamChecker();\n$this-\u003eservice-\u003esetPathToSpamList('/path/to/spamlist.txt');\n```\n\n#### setList($list)\n\nSet the contents of the spam-list yourself.\n\n#### setText($text)\n\nText you want to validate. We would recomment using the property on the `isSpam` method instead.\n\n#### getText()\n\nReturns validated text.\n\n#### downloadList()\n\nRefetch the list from the external source.\n\n## Credits\n\nmoinmo's awesome job at creating a dictionary of spam-words.\n\n## The MIT License (MIT)\n\nCopyright (c) 2016 Simon Sessingø / pecee framework\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskipperbent%2Fpecee-spam-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskipperbent%2Fpecee-spam-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskipperbent%2Fpecee-spam-validator/lists"}