Please tell me: What i have to do to send title and message with Umlauts to the api to make a thread without the wrong output /&%§("/&.
Is this possible at all?
Is this possible at all?
Code:
'Content-Type: application/x-www-form-urlencoded;',
'XF-Api-User: 123',
'XF-Api-Key: 123'
Code:
$post = [
'node_id' => '123',
'title' => "äüßö",
'message' => "äüßö",
];
$post = http_build_query($post);
$furl = 'https://www.example.com/api/threads/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_URL, $furl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);