Using CURL and php, no longer works from API update


I come to you because I usually use CURL in PHP to feed my database, but since the update of the API it does not work anymore and I do not know how to solve the problem.

I recovered on the page of a design, id, title, tag, description and image.

I use CURL in php to feed my database with the infos of the designs.

But it does not work anymore.

can you help me?

$site_url = htmlspecialchars($_POST[‘url’]);
$user_agent = “Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20140319 Firefox/24.0 Iceweasel/24.4.0”;
$design = [];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $site_url);
curl_setopt($ch, CURLOPT_USERAGENT,$user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$resultat = curl_exec($ch);

Maybe you find this useful:

Be sure to authenticate with a valid session to retrieve informations via api.

I have a little trouble with your example I am not very strong.

I do not get information from the API, I use curl to retrieve information in the html.

I’ll respond to you here: Utilisation CURL et php, fonctionne plus depuis MAJ de API