Commit 3f5287bc authored by Okthane's avatar Okthane

certificat

parent 9a7b3ed6
No preview for this file type
......@@ -12,20 +12,22 @@
// if(array_key_exists($ext, $allowed))
// {
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// curl_setopt($ch, CURLOPT_CAINFO,__DIR__ . DIRECTORY_SEPARATOR . 'certif.cer');
// curl_setopt($ch, CURLOPT_CAPATH,__DIR__ . DIRECTORY_SEPARATOR);
curl_setopt($ch, CURLOPT_URL, 'https://api.remove.bg/v1.0/removebg');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$post = array(
// 'image_file' => '@' .realpath('/img'.$_FILES["photo"]["name"]),
'image_file' => '/img/pierremarque.jpg',
'size' => 'auto'
'image_file' =>'@' .realpath('/img/'.'pierremarque.jpg') ,
'size' => 'auto',
'format'=>'JPG'
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$headers = array();
$headers[] = 'X-Api-Key: Es8bAw68rDddjoK47i9EASEy';
$headers[] = 'X-Api-Key:qYXf5PimffLjeH1i5B1rySQw';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment