At great demand, APIs have been released for our Pastebin service.
This is a beta version, available only for premium users.
Using them is damn easy, here’s a ready, copy and paste example in PHP.
<?php
$text = "
var a = 1;
var b = 2;
var c = a + b;";
$data = array("apikey" => "YOUR_API_KEY",
"title" => "A title",
"text" => $text,
"language" => "javascript");
$curl = curl_init("https://api.dotmaui.com/client/1.0/pastebin/new/");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($curl);
curl_close($curl);
echo $output;
You can read the documentation here.