/U',$user,-1,PREG_SPLIT_DELIM_CAPTURE); foreach($a as $i=>$e) { if($i%2==0) { // Text if($this->HREF) $this->PutLink($this->HREF,$e); else $this->Write(5,$e); } else { // Tag if($e[0]=='/') $this->CloseTag(strtoupper(substr($e,1))); else { // Extract attributes $a2 = explode(' ',$e); $tag = strtoupper(array_shift($a2)); $attr = array(); foreach($a2 as $v) { if(preg_match('/([^=]*)=["\']?([^"\']*)/',$v,$a3)) $attr[strtoupper($a3[1])] = $a3[2]; } $this->OpenTag($tag,$attr); } } } } } $user = $_POST['user']; $pdf = new PDF(); $pdf->AddPage(); $pdf->SetFont('Arial','B',16); $pdf->WriteHTML((string)$user); $pdf->Output(); ?>
Username: