Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Api Client Laravel Package

mosparo/php-api-client

PHP API client for mosparo spam protection. Connect to a mosparo instance, send verification requests for form submissions, handle validation results, and integrate bot protection into your PHP/Laravel apps with a simple, lightweight client.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Buy – Leverages an existing, battle-tested solution for form submission verification, reducing development time and maintenance overhead. Avoids reinventing anti-spam/validation logic.
  • Feature Expansion: Enables real-time form validation for high-risk submissions (e.g., contact forms, lead gen, or e-commerce) by integrating with mosparo’s anti-spam engine without manual rule management.
  • Compliance & Trust: Supports GDPR/CCPA-compliant form processing by ensuring only verified submissions are stored/processed, reducing legal exposure from spam or bot submissions.
  • Analytics Integration: Provides submission statistics (spam vs. valid) via getStatisticByDate(), enabling data-driven decisions on form UX or marketing campaigns.
  • Rule Management Automation: Facilitates dynamic rule updates for large-scale forms via batchUpdateRulePackage() and streamRulePackageHashIndex(), critical for enterprises with complex validation workflows.
  • Cost Efficiency: Replaces or augments third-party CAPTCHA services (e.g., reCAPTCHA) with a self-hosted alternative, reducing dependency on external vendors.

When to Consider This Package

Adopt if:

  • Your product relies on high-volume form submissions (e.g., SaaS signups, surveys, or e-commerce) where spam/bots are a critical risk.
  • You need real-time validation without relying on client-side-only solutions (e.g., JavaScript challenges).
  • Your team lacks expertise in anti-spam rule engineering but requires customizable validation logic.
  • You’re already using mosparo or evaluating it for form protection, and want seamless PHP integration.
  • You require metadata storage (e.g., tracking submission context like campaign IDs) alongside verification.

Look elsewhere if:

  • Your forms are low-volume or low-risk (e.g., internal tools), making spam mitigation unnecessary.
  • You need multi-language OCR or advanced image verification (mosparo focuses on form data, not media).
  • Your stack is non-PHP (e.g., Node.js, Python), requiring a different client library.
  • You prioritize zero-code solutions (e.g., pre-built form builders with native anti-spam) over custom integration.
  • Compliance requirements mandate third-party audited solutions (e.g., reCAPTCHA Enterprise).

How to Pitch It (Stakeholders)

For Executives:

"This PHP package integrates with mosparo, a self-hosted anti-spam engine, to verify form submissions in real-time—blocking bots and spam without relying on external services like reCAPTCHA. By adopting this, we:

  • Reduce costs by eliminating vendor lock-in for form protection.
  • Improve conversion rates by minimizing false positives (e.g., blocking legitimate users).
  • Enhance compliance with data privacy laws by processing only verified submissions.
  • Gain actionable insights via submission analytics (spam vs. valid rates). It’s a turnkey solution for high-risk forms, requiring minimal dev effort while future-proofing against evolving spam tactics."

For Engineering:

"The mosparo PHP client provides a Guzzle-based API wrapper for mosparo’s verification and rule-management endpoints. Key benefits:

  • Plug-and-play validation: Verify submissions with a single verifySubmission() call, returning structured results (e.g., field-level validation status).
  • Rule automation: Update validation rules programmatically via batch APIs, ideal for A/B testing or dynamic form logic.
  • Performance: Supports streaming hash indexes for large rule packages (e.g., >10K rules) and pagination for rule retrieval.
  • Compatibility: Works with PHP 8.1+ and mosparo 1.5+, with backward support for older versions. Use case: Drop this into your form handler to replace manual spam checks or third-party CAPTCHAs. Example:*
$result = $client->verifySubmission($_POST, $_POST['_mosparo_submitToken'], $_POST['_mosparo_validationToken']);
if ($result->isSubmittable()) {
    processLegitimateSubmission();
} else {
    logSpamAttempt($result->getIssues());
}
```*
*Trade-off*: Requires mosparo setup (self-hosted), but eliminates ongoing CAPTCHA costs."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
symfony/ai-symfony-mate-extension
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata