I have the problem, that my PHP code seems not so right and I come not to a sollution. Maybe someone can help me with my problem.
I want to mark a ingame mail as read with a curl request but it doesn’t work. there are no errors appear.
The code before works fine. My only problem ist the PUT request to mark the mail as read.
Has anybody an idea?
Here is my code:
$post_field = array(“read” => “true”);
$ch8 = curl_init();
$header8='Authorization: Bearer '.$auth_token;
curl_setopt($ch8, CURLOPT_URL, $lookup_url8);
curl_setopt($ch8, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch8, CURLOPT_HTTPHEADER, array($header8));
curl_setopt($ch8, CURLOPT_CUSTOMREQUEST, “PUT”);
curl_setopt($ch8, CURLOPT_POSTFIELDS, http_build_query($post_field));
curl_setopt($ch8, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch8, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch8, CURLOPT_SSL_VERIFYHOST, 2);
$result8 = curl_exec($ch8);