/api/sendimage/?apikey=apikey&url=url
Our submit endpoint allows you to add new images to the moderation queue. It accepts two required parameters - an API key which can be generated after logging in and the URL to the photo you want moderating. It optionally accepts a custom return ID and return URL.
$ch = curl_init();
$url = "https://www.modraptor.com/api/sendimage/?apikey=$apikey&url=$url";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
// decode json response and handle it
$decoded = json_decode($output);
if ($decoded->success) {
echo "Image waiting for review. Imageid: ".$decoded->imageid;
} else {
echo $decoded->error_description;
echo $decoded->error_code;
/* error codes:
10 - Missing, incorrect length, or malformed API key
11 - API key not found
20 - Confirm email before using service
21 - Account inactive
22 - No more requests available please purchase more
30 - Missing or invalid url parameter
31 - Could not connect to url
*/
}
Get started with 100 free images!