My name is Leo Baiano, I am Brazilian and my English is not very good, a little PHP program and I am starting time trying to work with the Twitter API. I found a class ready for sending messages but I'm having problems with some characters.
The class works but when I use any special characters in the message here in Brazil two characters after the special character disappears. For example, if I try to send the message: send only acentuação the class acentuaç If I try to send: a escola é longe is sent: a escola éonge The class I'm using is: $msg = "Testando acentuação com XML préss aqui!!!!"; $out = "POST http://twitter.com/statuses/update.json HTTP/1.1\r\n"; $out .= "Host: twitter.com\r\n"; #Configure abaixo o seu login e senha do Twitter $out .= "Authorization: Basic ".base64_encode ('user:senha')."\r\n"; $out .= "Content-type: application/x-www-form-urlencoded\r\n"; $out .= "Content-length: ".strlen("status=$msg")."\r\n"; $out .= "Connection: Close\r\n\r\n"; $out .= "status=$msg"; $fp = fsockopen ("twitter.com", 80); if (fwrite($fp, $out)) { echo $msg." enviada!"; } fclose($fp);