datadome / datamarketplace-php
A PHP client to DataDome Data Market Place API
Requires
- php: ^5.3.3 || ^7.0
- monolog/monolog: dev-master
This package is not auto-updated.
Last update: 2018-12-13 19:45:36 UTC
README
DataDome | Protect your website from bot traffic and monetize your data
DataDome is a growing french startup pioneering bot detection and protection for content publishers, eCommerce websites and advertisers across the world.
Our company aims at creating a safer, cleaner Web for everyone by ensuring qualified traffic and optimized revenues for online businesses.
This PHP client allows to connect to the Data Market Place API, to push data to sell, or buy data available on the Data Market Place.
1. Get your DataDome credentials
To get your DataDome credentials:
- subscribe for free on https://datadome.co/free-signup/
- install the DataDome module on your infrastructure to protect your content from bad bots!
- a DataDome account manager will guide you to sell / buy data within the DataDome Data Market Place
2. Connect to the Data Market Place API
Get the PHP client with composer:
wget https://getcomposer.org/composer.phar
php composer.phar require datadome/datamarketplace-php
Use the PHP client:
require('vendor/autoload.php');
define('YOUR_DATADOME_API_KEY', 'XXXXXX');
// Connect to DataDome API
$datadomeClient = new DataDome\DataDomeClient(YOUR_DATADOME_API_KEY);
// Search for last published forum posts
$forumPosts = $datadomeClient->search('/posts');
if ($forumPosts === null) {
print 'An error occured. HTTP code: ' . $datadomeClient->getLastHttpCode() . ' - Message: ' . $datadomeClient->getLastErrorMessage() . ' - See logs for further details';
exit;
}
print_r($forumPosts);
API doc is available here: Data Market Place API documentation