( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?php // Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/
$url = "https://api.remove.bg/v1.0/removebg";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'x-api-key:gw7vYaNwJrxZtfPYvhY9DtSC',
]);
// move image_url here:
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'image_url' => 'http://localhost/thebrand/8f35ba26fe296e36b3a96ee5416259b4.jpg',
]);
$server_output = curl_exec($ch);
$fp = fopen("no-bg.png", "wb");
fwrite($fp, $server_output);
fclose($fp);
curl_close($ch);
?>