View Full Version : PHP... Hmm..
This is mainly to anyone that can use explode (THOMAS OR NETS LOL)
Anyway, is it possible, just like your MySpacePicture thing, to get the avatar, name and usertitle out of someones profile? And their VIP status
Cos you could have
function habbox($id){
Then have
echo habbox("ID FOR UR ACCOUNT HERE");
thanks.
Ok, i need to reprashe that:
Can anyone write a code for it please?
Do you mean from HabboxForum?
If so I could try write one for you.
You can't do it though.
Logout and go to:
http://www.habboxforum.com/member.php?u=36091
You'll get:
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
You are not logged in. Fill in the form at the bottom of this page and try again.
You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Thats preeeety dumb.
Edit: But if you transfer it into GD, and put it in your sig, I suppose most members would be logged in looking at it..
I was just about to post that. I did code it though.
<?php
function getHabboxName($id){
$data = file_get_contents("http://www.habboxforum.com/member.php?u=".$id);
$name = explode('<td class="tcat">View Profile<span class="normal">: ', $data);
$name = explode('</span></td>', $name[1]);
$name = trim($name[0]);
return $name;
}
//Example
echo getHabboxName(36091)."<br><br>";
function getHabboxAvatar($id){
$data = file_get_contents("http://www.habboxforum.com/member.php?u=".$id);
$avatar = explode('<td><img src="image.php?u=', $data);
$avatar = explode('"', $avatar[1]);
$avatar = trim($avatar[0]);
$avatar = "http://www.habboxforum.com/image.php?u=".$avatar;
return $avatar;
}
//Example
echo '<img src="'.getHabboxAvatar(36091).'" /><br><br>';
function getHabboxUserTitle($id){
$data = file_get_contents("http://www.habboxforum.com/member.php?u=".$id);
$usertitle = explode('<div class="smallfont"><b><font size=1>', $data);
$usertitle = explode('</font></b></div>', $usertitle[1]);
$usertitle = trim($usertitle[0]);
}
//Example
echo getHabboxUserTitle(36091)."<br><br>";
function isVIP($id){
$data = file_get_contents("http://www.habboxforum.com/member.php?u=".$id);
if(eregi('<img src="images/ranks/VIP.gif" alt="" border="" />', $data)){
return true;
}else{
return false;
}
}
//Example
if(isVIP(36091)){
echo "VIP";
}else{
echo "Not VIP";
}
?>
Obviously it doesnt work and I dont know if theres errors :P
I was just about to post that. I did code it though.
Post please :D
I guess that was usless, lol :( Hmm what else could you do it on..
Well you obviously could do it on forums that allow it (dont see why Habbox dont).
Carlsta
23-02-2007, 04:46 PM
Mmmm i uploaded it to my site
www.carlstac.com/test.php
Yeah we've already said it doesnt work.
Carlsta
23-02-2007, 04:48 PM
It does work sort off..
Lol, Im thinking, hmm how about this:
On project washing machine, you can have a custom message, when you click your washing machine it comes up with the message. The message is in the source of the page anyway, so see if you can get the custom message of a washing machine by the user (in the source aswell) by using that:
Basicly:
It gets the custom message from the source by looking for the member
Link:
http://www.tehwasher.co.uk/view.php
<?php
function getMessage($name){
$data = file_get_contents("http://www.tehwasher.co.uk/view.php");
$message = explode($name."'s Washing Machine<br />Custom Message: <br />", $data);
$message = explode('">', $message[1]);
$message = trim($message[0]);
return $message;
}
echo getMessage("Ryan");
?>
I havent tried it.
<?php
function getMessage($name){
$data = file_get_contents("http://www.tehwasher.co.uk/view.php");
$message = explode($name."'s Washing Machine<br />Custom Message: <br />", $data);
$message = explode('">', $message[1]);
$message = trim($message[0]);
return $message;
}
echo getMessage("Ryan");
?>
I havent tried it.
Well done! It works!
Thanks :) .
I put it into gd, hold on:
http://tehwasher.co.uk/message/Ryan/
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.