safecomms/safecomms-php

Official PHP SDK for SafeComms API

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 3

pkg:composer/safecomms/safecomms-php

v0.1.1 2025-12-22 04:14 UTC

This package is auto-updated.

Last update: 2026-01-21 12:19:29 UTC


README

Official PHP client for the SafeComms API.

SafeComms is a powerful content moderation platform designed to keep your digital communities safe. It provides real-time analysis of text to detect and filter harmful content, including hate speech, harassment, and spam.

Get Started for Free: We offer a generous Free Tier for all users, with no credit card required. Sign up today and start protecting your community immediately.

Documentation

For full API documentation and integration guides, visit https://safecomms.dev/docs.

Installation

Install via Composer:

composer require safecomms/safecomms-php

Usage

<?php

require 'vendor/autoload.php';

use SafeComms\SafeCommsClient;

$client = new SafeCommsClient('your-api-key');

try {
    // Moderate text
    $result = $client->moderateText(
        content: 'Some text to check',
        language: 'en',
        replace: false,
        pii: false,
        replaceSeverity: null,
        moderationProfileId: 'prof_123'
    );

    print_r($result);

    // Get usage
    $usage = $client->getUsage();
    print_r($usage);

} catch (Exception $e) {
    echo 'Error: ' . $e->getMessage();
}