certly / threatexchange
There is no license information available for the latest version (v1.4.1) of this package.
ThreatExchange client.
v1.4.1
2016-10-19 23:20 UTC
Requires
- guzzlehttp/guzzle: ^6.1
This package is not auto-updated.
Last update: 2026-03-06 15:44:40 UTC
README
Interact with the ThreatExchange API via PHP.
composer require certly/threatexchange
Documentation
Initialize a ThreatExchange object with your application ID and application secret. All API calls will return a stdClass with the result.
$tx = new Certly\ThreatExchange\ThreatExchange("123", "abc");
echo var_dump($tx->getThreatExchangeMembers());
You can call other endpoints not directly implemented with the call function. You'll be authenticated automatically.
$tx = new Certly\ThreatExchange\ThreatExchange("123", "abc");
$tx->call("/898557073557972/descriptors", "GET");
If you need to pass parameters for a GET or POST request, just pass an associative array.
$tx = new Certly\ThreatExchange\ThreatExchange("123", "abc");
$tx->call("/898557073557972/descriptors", "GET", [
"param_name" => "param_value"
]);
You can also use GET and POST specific functions.
$tx = new Certly\ThreatExchange\ThreatExchange("123", "abc");
$tx->get("/898557073557972/descriptors", [
"param_name" => "param_value"
]);
If you want to retrieve more results, simply use the next function with the pagination URL returned from your previous request.
$tx = new Certly\ThreatExchange\ThreatExchange("123", "abc");
$result = $tx->getThreatIndicators("domain", "ian.sh", ["limit" => 1]);
$tx->next($result->paging->next);