$client_id = "123123asdasd3123"; //example(not real) client_id
$Mashape_Key = "fsdfasdfdfarewr2342432231231"; //example(not real) X-Mashape-Key
$headers = array('Authorization: Client-ID ' . $client_id, 'X-Mashape-Key: ' . $Mashape_Key);
$image = $_POST['url']; // i send image url, example http://i.imgur.com/w9eZVxW.png
$post_arr = array(
'image' => $image,
'type' => 'url',
'name' => 'test_name',
'title' => 'test title',
'description' => 'blablabla'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://imgur-apiv3.p.mashape.com/3/image');
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_arr);
$reply = curl_exec($ch);
var_dump($reply);
curl_close($ch);
$reply = json_decode($reply);
$newimgurl = $reply->data->link;
echo $newimgurl;
string(105) "{"data":{"error":"Invalid URL ()","request":"\/3\/image\/","method":"POST"},"success":false,"status":400}"