Kod:
<? extract($GLOBALS); if(!$parts[1])die("".$main->diee("Podaj nick usera :)").""); //Nie kminie tego w Wampirka skrypcie :D $q = $db->query("SELECT `numer` FROM `nicki` WHERE `nick`='{$parts[1]}' OR `id` = {$parts[1]}"); if($q->num_rows == 0) die("".$main->diee("Podany user nie istnieje.").""); while($data = $q ->fetch_assoc ()){ $numerek = $data['numer']; } $d = simplexml_load_string('http://api.gadu-gadu.pl/users/'.$numerek.'.xml'); $info = $d->users->user[0]; $birth = explode ('T', $info->birth); $mb = new MessageBuilder(); $mb->addText("Dane z katalogu usera <{$parts[1]}>:\r\nNick:".$info->nick."\r\nData urodzenia: {$birth[0]}\r\nMiasto: ".$info->city."\r\nAvatar:")->addImage($info->avatars->avatar->smallAvatar, IMG_RAW)->setRecipients($from); $p->push($mb); $mb->clear(); ?>
Komentarz