
Originally Posted by
BielzDev
The problem: the habbo client, for example, can only be accessed if you are logged in. :/
but I'll think of a solution ... thanks for the suggestion!

This is to send a message on the home but it can help.
PHP Code:
<?
function botMsg($message) {
$email = "email";
$senha = "pass";
$guestbookId = "16442862";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_VERBOSE, 1);
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
@curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_COOKIEJAR, getcwd()."/cookies.txt");
curl_setopt ($ch, CURLOPT_URL, "http://www.habbo.com.br/account/submit?credentials.username=$email&credentials.password=$senha");
$loginRes = curl_exec ($ch);
preg_match('/<a href="(.*?)">/im', $loginRes, $checkError);
$page = @split('"',$checkError[1]);
$page = $page[0];
curl_setopt ($ch, CURLOPT_URL, $page."/me");
$paginaPrincipal = curl_exec($ch);
preg_match_all('#<meta name="csrf-token" content="(.*?)"/>#i',$paginaPrincipal,$csrf);
$appkey = $csrf[1][0];
$messageString = array("ownerId"=>"123","message"=>"$message","scope"=>"1","query"=>"","widgetId"=>"$guestbookId");
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $messageString);
curl_setopt ($ch, CURLOPT_REFERER, "http://www.habbo.com.br/home/--Rafael");
curl_setopt ($ch, CURLOPT_HTTPHEADER, array(
"X-App-Key: $appkey",
"X-Requested-With: XMLHttpRequest"
));
curl_setopt ($ch, CURLOPT_URL, "http://www.habbo.com.br/myhabbo/guestbook/add");
curl_exec ($ch);
};
?>