Hello,
As some of you are probably aware Habbo recently changed their systems so that mottos couldn't be grabbed using the normal method from the homepages.
Below is a new PHP function I've written to successfully grab peoples mottos
That should work just straight off. If not it will be to do with the Server IP address. If this is the case, simply replace thePHP Code:<?php
function mottoGrab($username) {
$url = 'http://www.habbo.com/home/'.$username;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)');
curl_setopt($ch, CURLOPT_COOKIE, "YPF8827340282Jdskjhfiw_928937459182JAX666=".$_SERVER['SERVER_ADDR']); //saved cookies
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$string = curl_exec ($ch);
curl_close ($ch);
$regex = '#\<div class="profile-motto"\>(.+?)\<\/div\>#s';
preg_match($regex, $string, $matches);
$match = $matches[0];
echo $match;
}
mottoGrab(xxMattGxx);
?>
line with:PHP Code:curl_setopt($ch, CURLOPT_COOKIE, "YPF8827340282Jdskjhfiw_928937459182JAX666=".$_SERVER['SERVER_ADDR']); //saved cookies
PHP Code:curl_setopt($ch, CURLOPT_COOKIE, "YPF8827340282Jdskjhfiw_928937459182JAX666=YOURSERVERIP"); //saved cookies







Reply With Quote







