• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

php page to export json stuff

hi all!
I need a php page that give me some json info about the user current logged into the forum...
how can I start to do this? (i'm able to made the print out, but I need to learn how to retrieve the info from the forum)

thanks in advance
thanks, but I don't need to connect directly to the db (how can I do which user is?)
here is an example of my piece of code written for vBulletin:
$this->member = $vbulletin->userinfo;
$this->member['last_visit'] = $vbulletin->userinfo['lastvisit'];
$this->member['session_id'] = $vbulletin->session->vars['idhash'];       
//$board_functions = "VB/vb_board_functions.php";
//avatar ---------------
$avatar = fetch_avatar_url($this->member['userid']);
$avatar = $avatar[0];
if ($avatar)
    if (!strpos($avatar, "ttp://"))
        $avatar = $GP_PATH.$FORUM_PATH."/".$avatar;
    $avatar = "<img src=\"$avatar\" border=\"0\" alt=\"\" />";
$this->member['avatar'] = $avatar;