Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. $french_name = urlencode($product['french_name']);
  2.  
  3. $french_description = urlencode($product['french_description']);
  4. $french_short_description = urlencode($product['french_ShortDescription']);
  5.  
  6. $lien = "https://api.deepl.com/v2/translate?auth_key=bd55c7a0-8e0c-dccc-ac44-7e8301a201c2&text=$french_name&text=$french_description&text=$french_short_description&target_lang=ES&tag_handling=xml";
  7.  
  8. $curl = curl_init();
  9.  
  10. curl_setopt($curl, CURLOPT_URL, $lien);
  11. curl_setopt($curl, CURLOPT_POST, true);
  12. var_dump(curl_error($curl));
  13. $return = curl_exec($curl);
  14. curl_close($curl);
  15.  
  16. var_dump($return);
  17. die();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement