Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Habbo Profile Search
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Hjp" data-source="post: 466627" data-attributes="member: 98324"><p>Greetings Everyone! </p><p></p><p>I really need help from you guys who are expert on it. How can I embed a Html code to my website if I want to convert php file. Please help me <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /> </p><p>Help me to convert this to HTML</p><p></p><table style='width: 100%'><tr><td><?php</td><td></td></tr><tr><td></td><td>// Include the Composer autoloader</td></tr><tr><td></td><td>include 'vendor/autoload.php';</td></tr><tr><td></td><td></td></tr><tr><td></td><td>// Shortcut for the FQN</td></tr><tr><td></td><td>use HabboAPI\Entities\Badge;</td></tr><tr><td></td><td>use HabboAPI\Entities\Habbo;</td></tr><tr><td></td><td>use HabboAPI\Entities\Photo;</td></tr><tr><td></td><td>use HabboAPI\Entities\Profile;</td></tr><tr><td></td><td>use HabboAPI\HabboAPI;</td></tr><tr><td></td><td>use HabboAPI\HabboParser;</td></tr><tr><td></td><td></td></tr><tr><td></td><td>// Create new Parser and API instance</td></tr><tr><td></td><td>$habboParser = new HabboParser('com');</td></tr><tr><td></td><td>$habboApi = new HabboAPI($habboParser);</td></tr><tr><td></td><td></td></tr><tr><td></td><td>try {</td></tr><tr><td></td><td> // Find the user 'koeientemmer' and get their ID</td></tr><tr><td></td><td> $myHabbo = $habboApi->getHabbo('koeientemmer');</td></tr><tr><td></td><td></td></tr><tr><td></td><td> // Get extra information about one of their groups</td></tr><tr><td></td><td> // Note: This is actually a hardcoded group ID to showcase the parseGroup() endpoint</td></tr><tr><td></td><td> $group = $habboApi->getGroup("g-hhus-b0751bd6408cc83a8e046de6949fd747");</td></tr><tr><td></td><td>} catch (Exception $e) {</td></tr><tr><td></td><td> echo '</td></tr><tr><td></td><td> <p>Oops. Can not find this Habbo!</p></td></tr><tr><td></td><td> <p>Try to catch this exception gracefully in your application!</p></td></tr><tr><td></td><td> <p>[' . $e->getCode() . '] ' . $e->getMessage() . '</p></td></tr><tr><td></td><td> <hr></td></tr><tr><td></td><td> ' . nl2br($e->getTraceAsString()) . '</td></tr><tr><td></td><td> ';</td></tr><tr><td></td><td> exit();</td></tr><tr><td></td><td>}</td></tr><tr><td></td><td></td></tr><tr><td></td><td>if ($myHabbo->hasProfile()) {</td></tr><tr><td></td><td> // Collect all the profile info</td></tr><tr><td></td><td> /** @var Profile $myProfile */</td></tr><tr><td></td><td> $myProfile = $habboApi->getProfile($myHabbo->getId());</td></tr><tr><td></td><td>} else {</td></tr><tr><td></td><td> // This Habbo has a closed home, only show their Habbo object</td></tr><tr><td></td><td> $myProfile = new Profile();</td></tr><tr><td></td><td> $myProfile->setHabbo($myHabbo);</td></tr><tr><td></td><td>}</td></tr><tr><td></td><td></td></tr><tr><td></td><td>// Get all their photos</td></tr><tr><td></td><td>$myPhotos = $habboApi->getPhotos($myHabbo->getId());</td></tr><tr><td></td><td></td></tr><tr><td></td><td>// Export as HTML</td></tr><tr><td></td><td>$html = [</td></tr><tr><td></td><td> 'habbo' => '',</td></tr><tr><td></td><td> 'worn_badges' => '',</td></tr><tr><td></td><td> 'friends' => '',</td></tr><tr><td></td><td> 'groups' => '',</td></tr><tr><td></td><td> 'rooms' => '',</td></tr><tr><td></td><td> 'badges' => '',</td></tr><tr><td></td><td> 'photos' => ''</td></tr><tr><td></td><td>];</td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td>// Some markup for the Habbo part</td></tr><tr><td></td><td></td></tr><tr><td></td><td>/* @var Habbo $habbo */</td></tr><tr><td></td><td>$habbo = $myProfile->getHabbo();</td></tr><tr><td></td><td>$onlineText = $habbo->isOnline() ? "yes" : "no";</td></tr><tr><td></td><td>$lastAccess = ($habbo->getLastAccessTime()) ? $habbo->getLastAccessTime()->toFormattedDateString() : "N/A";</td></tr><tr><td></td><td>$html['habbo'] .= '<img src="<a href="http://www.habbo.com/habbo-imaging/avatarimage?figure=" target="_blank">http://www.habbo.com/habbo-imaging/avatarimage?figure=</a>' . $habbo->getFigureString() . '&size=l&gesture=sml&head_direction=3"</td></tr><tr><td></td><td> alt="' . $habbo->getHabboName() . '" title="' . $habbo->getHabboName() . '" style="float: left; margin-right: 10px;" />';</td></tr><tr><td></td><td>$html['habbo'] .= '<h3>' . $habbo->getHabboName() . '</h3>';</td></tr><tr><td></td><td>$html['habbo'] .= '<p>' . $habbo->getMotto() . '<br><em>' . $habbo->getMemberSince()->toFormattedDateString() . '</em></p>';</td></tr><tr><td></td><td>$html['habbo'] .= '<p>Online: ' . $onlineText . '<br>Last seen: <em>' . $lastAccess . '</em></p>';</td></tr><tr><td></td><td></td></tr><tr><td></td><td>if ($habbo->getProfileVisible()) {</td></tr><tr><td></td><td> $html['habbo'] .= '<p><a href="<a href="https://www.habbo.com/profile/" target="_blank">https://www.habbo.com/profile/</a>' . $habbo->getHabboName() . '">View home &raquo;</a></p>';</td></tr><tr><td></td><td>}</td></tr><tr><td></td><td></td></tr><tr><td></td><td>if ($badges = $habbo->getSelectedBadges()) {</td></tr><tr><td></td><td> foreach ($badges as $badge) {</td></tr><tr><td></td><td> /** @var Badge $badge */</td></tr><tr><td></td><td> $html['worn_badges'] .= '</td></tr><tr><td></td><td> <div class="media"></td></tr><tr><td></td><td> <div class="media-left media-middle"></td></tr><tr><td></td><td> <a href="#"></td></tr><tr><td></td><td> <img class="media-object" src="<a href="http://images.habbo.com/c_images/album1584/" target="_blank">http://images.habbo.com/c_images/album1584/</a>' . $badge->getCode() . '.gif" alt="' . $badge->getName() . '"></td></tr><tr><td></td><td> </a></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> <div class="media-body"></td></tr><tr><td></td><td> <h4 class="media-heading">' . $badge->getName() . '</h4></td></tr><tr><td></td><td> <em>' . $badge->getDescription() . '</em></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> ';</td></tr><tr><td></td><td> }</td></tr><tr><td></td><td>}</td></tr><tr><td></td><td></td></tr><tr><td></td><td>if ($myHabbo->hasProfile()) {</td></tr><tr><td></td><td> // Show all the other sections as an unordered list</td></tr><tr><td></td><td> foreach (array("friends", "groups", "rooms", "badges") as $section) {</td></tr><tr><td></td><td> $html[$section] .= '<ul>';</td></tr><tr><td></td><td> $method_name = sprintf('get%s', ucfirst($section));</td></tr><tr><td></td><td> foreach (call_user_func(array($myProfile, $method_name)) as $object) {</td></tr><tr><td></td><td> $html[$section] .= '<li>' . $object . '</li>'; // uses the __toString() method</td></tr><tr><td></td><td> }</td></tr><tr><td></td><td> $html[$section] .= '</ul>';</td></tr><tr><td></td><td> }</td></tr><tr><td></td><td>}</td></tr><tr><td></td><td></td></tr><tr><td></td><td>// Generate the photos</td></tr><tr><td></td><td>if ($myPhotos) {</td></tr><tr><td></td><td> /** @var Photo $myPhoto */</td></tr><tr><td></td><td> foreach ($myPhotos as $myPhoto) {</td></tr><tr><td></td><td> $html['photos'] .= '</td></tr><tr><td></td><td> <div class="col-md-3"></td></tr><tr><td></td><td> <a href="<a href="https://www.habbo.com/profile/" target="_blank">https://www.habbo.com/profile/</a>' . $myPhoto->getCreatorName() . '/photo/' . $myPhoto->getId() . '" class="thumbnail"></td></tr><tr><td></td><td> <img src="' . $myPhoto->getPreviewUrl() . '" alt="' . $myPhoto->getId() . '"></td></tr><tr><td></td><td> </a></td></tr><tr><td></td><td> <div class="caption">Taken on ' . $myPhoto->getTakenOn()->toFormattedDateString() . ' by ' . $myPhoto->getCreatorName() . '</div></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> ';</td></tr><tr><td></td><td> }</td></tr><tr><td></td><td>}</td></tr><tr><td></td><td>?></td></tr><tr><td></td><td><!DOCTYPE html></td></tr><tr><td></td><td><html lang="en"></td></tr><tr><td></td><td><head></td></tr><tr><td></td><td> <meta charset="utf-8"></td></tr><tr><td></td><td> <meta http-equiv="X-UA-Compatible" content="IE=edge"></td></tr><tr><td></td><td> <meta name="viewport" content="width=device-width, initial-scale=1"></td></tr><tr><td></td><td> <title>HabboAPI</title></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <link href="<a href="https://bootswatch.com/3/lumen/bootstrap.min.css" target="_blank">https://bootswatch.com/3/lumen/bootstrap.min.css</a>" rel="stylesheet"></td></tr><tr><td></td><td> <style type="text/css"></td></tr><tr><td></td><td> html, body {</td></tr><tr><td></td><td> margin: 20px;</td></tr><tr><td></td><td> }</td></tr><tr><td></td><td></td></tr><tr><td></td><td> .media-left {</td></tr><tr><td></td><td> min-width: 60px;</td></tr><tr><td></td><td> }</td></tr><tr><td></td><td> </style></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --></td></tr><tr><td></td><td> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --></td></tr><tr><td></td><td> <!--[if lt IE 9]></td></tr><tr><td></td><td> <script src="<a href="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js" target="_blank">https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js</a>"></script></td></tr><tr><td></td><td> <script src="<a href="https://oss.maxcdn.com/respond/1.4.2/respond.min.js" target="_blank">https://oss.maxcdn.com/respond/1.4.2/respond.min.js</a>"></script></td></tr><tr><td></td><td> <![endif]--></td></tr><tr><td></td><td></head></td></tr><tr><td></td><td><body></td></tr><tr><td></td><td></td></tr><tr><td></td><td><div class="container"></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <div class="jumbotron"></td></tr><tr><td></td><td> <h1>HabboAPI</h1></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <p>A PHP wrapper library for the undocumented API of Habbo</p></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <p><a class="btn btn-primary btn-lg" href="<a href="https://github.com/gerbenjacobs/HabboAPI" target="_blank">https://github.com/gerbenjacobs/HabboAPI</a>" role="button"</td></tr><tr><td></td><td> target="_blank">Learn more</a></p></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <div class="row"></td></tr><tr><td></td><td> <div class="col-md-6"></td></tr><tr><td></td><td> <?php echo $html['habbo']; ?></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> <div class="col-md-6"></td></tr><tr><td></td><td> <?php echo $html['worn_badges']; ?></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <hr></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <div class="row"></td></tr><tr><td></td><td> <?php echo $html['photos']; ?></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <?php if ($myHabbo->hasProfile()): ?></td></tr><tr><td></td><td> <hr></td></tr><tr><td></td><td> <div class="row"></td></tr><tr><td></td><td> <div class="col-md-6"></td></tr><tr><td></td><td> <div class="row"></td></tr><tr><td></td><td> <div class="col-md-6"></td></tr><tr><td></td><td> <?php echo $html['badges']; ?></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> <div class="col-md-6"></td></tr><tr><td></td><td> <?php echo $html['friends']; ?></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> <div class="col-md-6"></td></tr><tr><td></td><td> <div class="row"></td></tr><tr><td></td><td> <div class="col-md-6"></td></tr><tr><td></td><td> <?php echo $html['groups']; ?></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> <div class="col-md-6"></td></tr><tr><td></td><td> <?php echo $html['rooms']; ?></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> <?php if ($group): ?></td></tr><tr><td></td><td> <hr></td></tr><tr><td></td><td> <div class="row"></td></tr><tr><td></td><td> <div class="col-md-12"></td></tr><tr><td></td><td> <img src="<a href="https://www.habbo.com/habbo-imaging/badge/" target="_blank">https://www.habbo.com/habbo-imaging/badge/</a><?php echo $group->getBadgeCode(); ?>.gif"></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <h3></td></tr><tr><td></td><td> <span</td></tr><tr><td></td><td> style="display: inline-block; border: 1px solid #000; width: 20px; background-color: #<?php echo $group->getPrimaryColor(); ?>;">&nbsp;</span></td></tr><tr><td></td><td> <span</td></tr><tr><td></td><td> style="display: inline-block; border: 1px solid #000; width: 20px; background-color: #<?php echo $group->getSecondaryColor(); ?>;">&nbsp;</span></td></tr><tr><td></td><td> <?php echo $group->getName(); ?></td></tr><tr><td></td><td> </h3></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <p>[<?php echo $group->getType(); ?>] - <?php echo $group->getDescription(); ?></p></td></tr><tr><td></td><td> <p></td></tr><tr><td></td><td> <a class="btn btn-default"</td></tr><tr><td></td><td> href="<a href="https://www.habbo.com/hotel?room=" target="_blank">https://www.habbo.com/hotel?room=</a><?php echo $group->getRoomId(); ?>"</td></tr><tr><td></td><td> target="_blank">Go to room <span class="glyphicon glyphicon-chevron-right"</td></tr><tr><td></td><td> aria-hidden="true"></span></a></td></tr><tr><td></td><td> </p></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <?php $members = $group->getMembers();</td></tr><tr><td></td><td> if (count((array)$members) > 0): ?></td></tr><tr><td></td><td> <p>This group has <strong><?php echo count($group->getMembers()); ?></strong> members.</td></tr><tr><td></td><td> Here are 10 random ones:</p></td></tr><tr><td></td><td></td></tr><tr><td></td><td> <ul></td></tr><tr><td></td><td> <?php $list = array_rand($members, 10);</td></tr><tr><td></td><td> foreach ($list as $i): ?></td></tr><tr><td></td><td> <li><?php echo $members[$i]->getHabboName(); ?></li></td></tr><tr><td></td><td> <?php endforeach; ?></td></tr><tr><td></td><td> </ul></td></tr><tr><td></td><td> <?php endif; ?></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> <?php endif; ?></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> </div></td></tr><tr><td></td><td> <?php endif; ?></td></tr><tr><td></td><td></div></td></tr><tr><td></td><td></td></tr><tr><td></td><td><script src="<a href="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" target="_blank">https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js</a>"></script></td></tr><tr><td></td><td><script src="<a href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" target="_blank">https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js</a>"></script></td></tr><tr><td></td><td></body></td></tr><tr><td></td><td></html></td></tr></table></blockquote><p></p>
[QUOTE="Hjp, post: 466627, member: 98324"] Greetings Everyone! I really need help from you guys who are expert on it. How can I embed a Html code to my website if I want to convert php file. Please help me :) Help me to convert this to HTML [TABLE] [TR] [TD]<?php[/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]// Include the Composer autoloader[/TD] [/TR] [TR] [TD][/TD] [TD]include 'vendor/autoload.php';[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]// Shortcut for the FQN[/TD] [/TR] [TR] [TD][/TD] [TD]use HabboAPI\Entities\Badge;[/TD] [/TR] [TR] [TD][/TD] [TD]use HabboAPI\Entities\Habbo;[/TD] [/TR] [TR] [TD][/TD] [TD]use HabboAPI\Entities\Photo;[/TD] [/TR] [TR] [TD][/TD] [TD]use HabboAPI\Entities\Profile;[/TD] [/TR] [TR] [TD][/TD] [TD]use HabboAPI\HabboAPI;[/TD] [/TR] [TR] [TD][/TD] [TD]use HabboAPI\HabboParser;[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]// Create new Parser and API instance[/TD] [/TR] [TR] [TD][/TD] [TD]$habboParser = new HabboParser('com');[/TD] [/TR] [TR] [TD][/TD] [TD]$habboApi = new HabboAPI($habboParser);[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]try {[/TD] [/TR] [TR] [TD][/TD] [TD] // Find the user 'koeientemmer' and get their ID[/TD] [/TR] [TR] [TD][/TD] [TD] $myHabbo = $habboApi->getHabbo('koeientemmer');[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] // Get extra information about one of their groups[/TD] [/TR] [TR] [TD][/TD] [TD] // Note: This is actually a hardcoded group ID to showcase the parseGroup() endpoint[/TD] [/TR] [TR] [TD][/TD] [TD] $group = $habboApi->getGroup("g-hhus-b0751bd6408cc83a8e046de6949fd747");[/TD] [/TR] [TR] [TD][/TD] [TD]} catch (Exception $e) {[/TD] [/TR] [TR] [TD][/TD] [TD] echo '[/TD] [/TR] [TR] [TD][/TD] [TD] <p>Oops. Can not find this Habbo!</p>[/TD] [/TR] [TR] [TD][/TD] [TD] <p>Try to catch this exception gracefully in your application!</p>[/TD] [/TR] [TR] [TD][/TD] [TD] <p>[' . $e->getCode() . '] ' . $e->getMessage() . '</p>[/TD] [/TR] [TR] [TD][/TD] [TD] <hr>[/TD] [/TR] [TR] [TD][/TD] [TD] ' . nl2br($e->getTraceAsString()) . '[/TD] [/TR] [TR] [TD][/TD] [TD] ';[/TD] [/TR] [TR] [TD][/TD] [TD] exit();[/TD] [/TR] [TR] [TD][/TD] [TD]}[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]if ($myHabbo->hasProfile()) {[/TD] [/TR] [TR] [TD][/TD] [TD] // Collect all the profile info[/TD] [/TR] [TR] [TD][/TD] [TD] /** @var Profile $myProfile */[/TD] [/TR] [TR] [TD][/TD] [TD] $myProfile = $habboApi->getProfile($myHabbo->getId());[/TD] [/TR] [TR] [TD][/TD] [TD]} else {[/TD] [/TR] [TR] [TD][/TD] [TD] // This Habbo has a closed home, only show their Habbo object[/TD] [/TR] [TR] [TD][/TD] [TD] $myProfile = new Profile();[/TD] [/TR] [TR] [TD][/TD] [TD] $myProfile->setHabbo($myHabbo);[/TD] [/TR] [TR] [TD][/TD] [TD]}[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]// Get all their photos[/TD] [/TR] [TR] [TD][/TD] [TD]$myPhotos = $habboApi->getPhotos($myHabbo->getId());[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]// Export as HTML[/TD] [/TR] [TR] [TD][/TD] [TD]$html = [[/TD] [/TR] [TR] [TD][/TD] [TD] 'habbo' => '',[/TD] [/TR] [TR] [TD][/TD] [TD] 'worn_badges' => '',[/TD] [/TR] [TR] [TD][/TD] [TD] 'friends' => '',[/TD] [/TR] [TR] [TD][/TD] [TD] 'groups' => '',[/TD] [/TR] [TR] [TD][/TD] [TD] 'rooms' => '',[/TD] [/TR] [TR] [TD][/TD] [TD] 'badges' => '',[/TD] [/TR] [TR] [TD][/TD] [TD] 'photos' => ''[/TD] [/TR] [TR] [TD][/TD] [TD]];[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]// Some markup for the Habbo part[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]/* @var Habbo $habbo */[/TD] [/TR] [TR] [TD][/TD] [TD]$habbo = $myProfile->getHabbo();[/TD] [/TR] [TR] [TD][/TD] [TD]$onlineText = $habbo->isOnline() ? "yes" : "no";[/TD] [/TR] [TR] [TD][/TD] [TD]$lastAccess = ($habbo->getLastAccessTime()) ? $habbo->getLastAccessTime()->toFormattedDateString() : "N/A";[/TD] [/TR] [TR] [TD][/TD] [TD]$html['habbo'] .= '<img src="[URL]http://www.habbo.com/habbo-imaging/avatarimage?figure=[/URL]' . $habbo->getFigureString() . '&size=l&gesture=sml&head_direction=3"[/TD] [/TR] [TR] [TD][/TD] [TD] alt="' . $habbo->getHabboName() . '" title="' . $habbo->getHabboName() . '" style="float: left; margin-right: 10px;" />';[/TD] [/TR] [TR] [TD][/TD] [TD]$html['habbo'] .= '<h3>' . $habbo->getHabboName() . '</h3>';[/TD] [/TR] [TR] [TD][/TD] [TD]$html['habbo'] .= '<p>' . $habbo->getMotto() . '<br><em>' . $habbo->getMemberSince()->toFormattedDateString() . '</em></p>';[/TD] [/TR] [TR] [TD][/TD] [TD]$html['habbo'] .= '<p>Online: ' . $onlineText . '<br>Last seen: <em>' . $lastAccess . '</em></p>';[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]if ($habbo->getProfileVisible()) {[/TD] [/TR] [TR] [TD][/TD] [TD] $html['habbo'] .= '<p><a href="[URL]https://www.habbo.com/profile/[/URL]' . $habbo->getHabboName() . '">View home »</a></p>';[/TD] [/TR] [TR] [TD][/TD] [TD]}[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]if ($badges = $habbo->getSelectedBadges()) {[/TD] [/TR] [TR] [TD][/TD] [TD] foreach ($badges as $badge) {[/TD] [/TR] [TR] [TD][/TD] [TD] /** @var Badge $badge */[/TD] [/TR] [TR] [TD][/TD] [TD] $html['worn_badges'] .= '[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="media">[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="media-left media-middle">[/TD] [/TR] [TR] [TD][/TD] [TD] <a href="#">[/TD] [/TR] [TR] [TD][/TD] [TD] <img class="media-object" src="[URL]http://images.habbo.com/c_images/album1584/[/URL]' . $badge->getCode() . '.gif" alt="' . $badge->getName() . '">[/TD] [/TR] [TR] [TD][/TD] [TD] </a>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="media-body">[/TD] [/TR] [TR] [TD][/TD] [TD] <h4 class="media-heading">' . $badge->getName() . '</h4>[/TD] [/TR] [TR] [TD][/TD] [TD] <em>' . $badge->getDescription() . '</em>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] ';[/TD] [/TR] [TR] [TD][/TD] [TD] }[/TD] [/TR] [TR] [TD][/TD] [TD]}[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]if ($myHabbo->hasProfile()) {[/TD] [/TR] [TR] [TD][/TD] [TD] // Show all the other sections as an unordered list[/TD] [/TR] [TR] [TD][/TD] [TD] foreach (array("friends", "groups", "rooms", "badges") as $section) {[/TD] [/TR] [TR] [TD][/TD] [TD] $html[$section] .= '<ul>';[/TD] [/TR] [TR] [TD][/TD] [TD] $method_name = sprintf('get%s', ucfirst($section));[/TD] [/TR] [TR] [TD][/TD] [TD] foreach (call_user_func(array($myProfile, $method_name)) as $object) {[/TD] [/TR] [TR] [TD][/TD] [TD] $html[$section] .= '<li>' . $object . '</li>'; // uses the __toString() method[/TD] [/TR] [TR] [TD][/TD] [TD] }[/TD] [/TR] [TR] [TD][/TD] [TD] $html[$section] .= '</ul>';[/TD] [/TR] [TR] [TD][/TD] [TD] }[/TD] [/TR] [TR] [TD][/TD] [TD]}[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]// Generate the photos[/TD] [/TR] [TR] [TD][/TD] [TD]if ($myPhotos) {[/TD] [/TR] [TR] [TD][/TD] [TD] /** @var Photo $myPhoto */[/TD] [/TR] [TR] [TD][/TD] [TD] foreach ($myPhotos as $myPhoto) {[/TD] [/TR] [TR] [TD][/TD] [TD] $html['photos'] .= '[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="col-md-3">[/TD] [/TR] [TR] [TD][/TD] [TD] <a href="[URL]https://www.habbo.com/profile/[/URL]' . $myPhoto->getCreatorName() . '/photo/' . $myPhoto->getId() . '" class="thumbnail">[/TD] [/TR] [TR] [TD][/TD] [TD] <img src="' . $myPhoto->getPreviewUrl() . '" alt="' . $myPhoto->getId() . '">[/TD] [/TR] [TR] [TD][/TD] [TD] </a>[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="caption">Taken on ' . $myPhoto->getTakenOn()->toFormattedDateString() . ' by ' . $myPhoto->getCreatorName() . '</div>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] ';[/TD] [/TR] [TR] [TD][/TD] [TD] }[/TD] [/TR] [TR] [TD][/TD] [TD]}[/TD] [/TR] [TR] [TD][/TD] [TD]?>[/TD] [/TR] [TR] [TD][/TD] [TD]<!DOCTYPE html>[/TD] [/TR] [TR] [TD][/TD] [TD]<html lang="en">[/TD] [/TR] [TR] [TD][/TD] [TD]<head>[/TD] [/TR] [TR] [TD][/TD] [TD] <meta charset="utf-8">[/TD] [/TR] [TR] [TD][/TD] [TD] <meta http-equiv="X-UA-Compatible" content="IE=edge">[/TD] [/TR] [TR] [TD][/TD] [TD] <meta name="viewport" content="width=device-width, initial-scale=1">[/TD] [/TR] [TR] [TD][/TD] [TD] <title>HabboAPI</title>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <link href="[URL]https://bootswatch.com/3/lumen/bootstrap.min.css[/URL]" rel="stylesheet">[/TD] [/TR] [TR] [TD][/TD] [TD] <style type="text/css">[/TD] [/TR] [TR] [TD][/TD] [TD] html, body {[/TD] [/TR] [TR] [TD][/TD] [TD] margin: 20px;[/TD] [/TR] [TR] [TD][/TD] [TD] }[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] .media-left {[/TD] [/TR] [TR] [TD][/TD] [TD] min-width: 60px;[/TD] [/TR] [TR] [TD][/TD] [TD] }[/TD] [/TR] [TR] [TD][/TD] [TD] </style>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->[/TD] [/TR] [TR] [TD][/TD] [TD] <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->[/TD] [/TR] [TR] [TD][/TD] [TD] <!--[if lt IE 9]>[/TD] [/TR] [TR] [TD][/TD] [TD] <script src="[URL]https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js[/URL]"></script>[/TD] [/TR] [TR] [TD][/TD] [TD] <script src="[URL]https://oss.maxcdn.com/respond/1.4.2/respond.min.js[/URL]"></script>[/TD] [/TR] [TR] [TD][/TD] [TD] <![endif]-->[/TD] [/TR] [TR] [TD][/TD] [TD]</head>[/TD] [/TR] [TR] [TD][/TD] [TD]<body>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]<div class="container">[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <div class="jumbotron">[/TD] [/TR] [TR] [TD][/TD] [TD] <h1>HabboAPI</h1>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <p>A PHP wrapper library for the undocumented API of Habbo</p>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <p><a class="btn btn-primary btn-lg" href="[URL]https://github.com/gerbenjacobs/HabboAPI[/URL]" role="button"[/TD] [/TR] [TR] [TD][/TD] [TD] target="_blank">Learn more</a></p>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <div class="row">[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="col-md-6">[/TD] [/TR] [TR] [TD][/TD] [TD] <?php echo $html['habbo']; ?>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="col-md-6">[/TD] [/TR] [TR] [TD][/TD] [TD] <?php echo $html['worn_badges']; ?>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <hr>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <div class="row">[/TD] [/TR] [TR] [TD][/TD] [TD] <?php echo $html['photos']; ?>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <?php if ($myHabbo->hasProfile()): ?>[/TD] [/TR] [TR] [TD][/TD] [TD] <hr>[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="row">[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="col-md-6">[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="row">[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="col-md-6">[/TD] [/TR] [TR] [TD][/TD] [TD] <?php echo $html['badges']; ?>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="col-md-6">[/TD] [/TR] [TR] [TD][/TD] [TD] <?php echo $html['friends']; ?>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="col-md-6">[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="row">[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="col-md-6">[/TD] [/TR] [TR] [TD][/TD] [TD] <?php echo $html['groups']; ?>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="col-md-6">[/TD] [/TR] [TR] [TD][/TD] [TD] <?php echo $html['rooms']; ?>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] <?php if ($group): ?>[/TD] [/TR] [TR] [TD][/TD] [TD] <hr>[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="row">[/TD] [/TR] [TR] [TD][/TD] [TD] <div class="col-md-12">[/TD] [/TR] [TR] [TD][/TD] [TD] <img src="[URL]https://www.habbo.com/habbo-imaging/badge/[/URL]<?php echo $group->getBadgeCode(); ?>.gif">[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <h3>[/TD] [/TR] [TR] [TD][/TD] [TD] <span[/TD] [/TR] [TR] [TD][/TD] [TD] style="display: inline-block; border: 1px solid #000; width: 20px; background-color: #<?php echo $group->getPrimaryColor(); ?>;"> </span>[/TD] [/TR] [TR] [TD][/TD] [TD] <span[/TD] [/TR] [TR] [TD][/TD] [TD] style="display: inline-block; border: 1px solid #000; width: 20px; background-color: #<?php echo $group->getSecondaryColor(); ?>;"> </span>[/TD] [/TR] [TR] [TD][/TD] [TD] <?php echo $group->getName(); ?>[/TD] [/TR] [TR] [TD][/TD] [TD] </h3>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <p>[<?php echo $group->getType(); ?>] - <?php echo $group->getDescription(); ?></p>[/TD] [/TR] [TR] [TD][/TD] [TD] <p>[/TD] [/TR] [TR] [TD][/TD] [TD] <a class="btn btn-default"[/TD] [/TR] [TR] [TD][/TD] [TD] href="[URL]https://www.habbo.com/hotel?room=[/URL]<?php echo $group->getRoomId(); ?>"[/TD] [/TR] [TR] [TD][/TD] [TD] target="_blank">Go to room <span class="glyphicon glyphicon-chevron-right"[/TD] [/TR] [TR] [TD][/TD] [TD] aria-hidden="true"></span></a>[/TD] [/TR] [TR] [TD][/TD] [TD] </p>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <?php $members = $group->getMembers();[/TD] [/TR] [TR] [TD][/TD] [TD] if (count((array)$members) > 0): ?>[/TD] [/TR] [TR] [TD][/TD] [TD] <p>This group has <strong><?php echo count($group->getMembers()); ?></strong> members.[/TD] [/TR] [TR] [TD][/TD] [TD] Here are 10 random ones:</p>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD] <ul>[/TD] [/TR] [TR] [TD][/TD] [TD] <?php $list = array_rand($members, 10);[/TD] [/TR] [TR] [TD][/TD] [TD] foreach ($list as $i): ?>[/TD] [/TR] [TR] [TD][/TD] [TD] <li><?php echo $members[$i]->getHabboName(); ?></li>[/TD] [/TR] [TR] [TD][/TD] [TD] <?php endforeach; ?>[/TD] [/TR] [TR] [TD][/TD] [TD] </ul>[/TD] [/TR] [TR] [TD][/TD] [TD] <?php endif; ?>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] <?php endif; ?>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] </div>[/TD] [/TR] [TR] [TD][/TD] [TD] <?php endif; ?>[/TD] [/TR] [TR] [TD][/TD] [TD]</div>[/TD] [/TR] [TR] [TD][/TD] [TD][/TD] [/TR] [TR] [TD][/TD] [TD]<script src="[URL]https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js[/URL]"></script>[/TD] [/TR] [TR] [TD][/TD] [TD]<script src="[URL]https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js[/URL]"></script>[/TD] [/TR] [TR] [TD][/TD] [TD]</body>[/TD] [/TR] [TR] [TD][/TD] [TD]</html>[/TD] [/TR] [/TABLE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Habbo Profile Search
Top