rendered paste body<?phpclass xhtml { var $buffers; var $doctype; var $taghtml; var $argsnum; // Generic Attributes var $gen_attrs; var $gen_coreattrs; var $gen_i18n; var $gen_events; var $gen_reserved; function xhtml () { $this->doctype = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"; $this->taghtml = "<html xmlns=\"http://www.w3.org/1999/xhtml\">"; $this->argsnum = 0; // Attributes Define Section $this->attributes_coreattrs = array("id","class","style","title"); $this->attributes_i18n = array("lang","dir"); $this->attributes_events = array("onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmousemove","onmouseout","onkeypress","onkeydown","onkeyup"); $this->attributes_attrs = array_merge($this->attributes_coreattrs,$this->attributes_i18n,$this->attributes_events); $this->attributes_focus = array("accesskey","tabindex"); $this->attributes_Shape = array("rect","circle","poly","default"); // Element Containers Define Section $this->containers_inline_forms = array("input","select","textarea","label","button"); $this->containers_phrase = array("em","strong","dfn","code","q","samp","kbd","var","cite","abbr","acronym","sub","sup"); $this->containers_fontstyle = array("tt","i","b","big","small"); $this->containers_special_pre = array("br","span","bdo","map"); $this->containers_special = array_merge($this->containers_special_pre,array("object,img")); $this->containers_misc_inline = array("ins","del","script"); $this->containers_misc = array_merge(array("noscript"),$this->containers_misc_inline); $this->containers_inline = array_merge(array("a"),$this->containers_special,$this->containers_fontstyle,$this->containers_phrase,$this->containers_inline_forms); $this->containers_Inline = array_merge($this->containers_inline,$this->containers_misc_inline); $this->containers_pre_content = array_merge(array("a"),$this->containers_fontstyle,$this->containers_phrase,$this->containers_special_pre,$this->containers_misc_inline,$this->containers_inline_forms); $this->containers_heading = array("h1","h2","h3","h4","h5","h6"); $this->containers_lists = array("ul","ol","dl"); $this->containers_blocktext = array("pre","hr","blockquote","address"); $this->containers_block = array_merge(array("p"),$this->containers_heading,array("div"),$this->containers_lists,$this->containers_blocktext,array("fieldset"),array("table")); $this->containers_Block = array_merge($this->containers_block,array("form"),$this->containers_misc); $this->containers_Flow = array_merge($this->containers_block,array("form"),$this->containers_inline,$this->containers_misc); $this->gen_reserved = array("datasrc","datafld","dataformatas"); // <LINK> //$this->tag_link = array_merge($this->gen_attrs,$this->gen_coreattrs,$this->gen_i18n,$this->gen_events); //array_push($this->tag_link,"charset","href","hreflang","type","rel","rev","media"); /* <html> - HTML Attributes = html %i18n , id , xmlns; */ $this->tag_html_attributes = array_merge($this->attributes_i18n,array("id"),array("xmlns")); /* <head> - HEAD Attributes = head %i18n , id , profile; */ $this->tag_head_attributes = array_merge($this->attributes_i18n,array("id"),array("profile")); /* <title> - TITLE Attributes = title %i18n , id; */ $this->tag_title_attributes = array_merge($this->attributes_i18n,array("id")); /* <base> - BASE Attributes = base href , id; */ $this->tag_base_attributes = array_merge(array("href"),array("id")); /* <meta> - META Attributes = meta %i18n , id , http-equiv , name , content , scheme; */ $this->tag_meta_attributes = array_merge($this->attributes_i18n,array("id"),array("http-equiv"),array("name"),array("content"),array("scheme")); /* <link> - LINK Attributes = link %attrs , href , hreflang , type , rel , rev , media; */ $this->tag_link_attributes = array_merge($this->attributes_attrs,array("href"),array("hreflang"),array("type"),array("rel"),array("rev"),array("media")); /* <style> - STYLE Attributes = style %i18n , id , type , media , title; */ $this->tag_style_attributes = array_merge($this->attributes_i18n,array("id"),array("type"),array("media"),array("title")); /* <script> - SCRIPT Attributes = script id , charset , type , src , defer; */ $this->tag_script_attributes = array_merge(array("id"),array("charset"),array("type"),array("src"),array("defer")); /* <noscript> - NOSCRIPT Attributes = noscript %attrs; */ $this->tag_noscript_attributes = $this->attributes_attrs; /* <body> - BODY Attributes = body %attrs , onload , onunload; */ $this->tag_body_attributes = array_merge($this->attributes_attrs,array("onload"),array("onunload")); /* <div> - DIV Attributes = div %attrs; Containers = div %Flow; */ $this->tag_div_attributes = $this->attributes_attrs; $this->tag_div_containers = $this->containers_Flow; /* <p> - PARAGRAPH Attributes = p %attrs Containers = p %Inline */ $this->tag_p_attributes = $this->attributes_attrs; $this->tag_p_containers = $this->containers_Inline; /* <h1> - HEADING 1 Attributes = h1 %attrs; Containers = h1 %Inline; */ $this->tag_h1_attributes = $this->attributes_attrs; $this->tag_h1_containers = $this->containers_Inline; /* <h1> - HEADING 2 Attributes = h2 %attrs; Containers = h2 %Inline; */ $this->tag_h2_attributes = $this->attributes_attrs; $this->tag_h2_containers = $this->containers_Inline; /* <h1> - HEADING 3 Attributes = h3 %attrs; Containers = h3 %Inline; */ $this->tag_h3_attributes = $this->attributes_attrs; $this->tag_h3_containers = $this->containers_Inline; /* <h1> - HEADING 4 Attributes = h4 %attrs; Containers = h4 %Inline; */ $this->tag_h4_attributes = $this->attributes_attrs; $this->tag_h4_containers = $this->containers_Inline; /* <h1> - HEADING 5 Attributes = h5 %attrs; Containers = h5 %Inline; */ $this->tag_h5_attributes = $this->attributes_attrs; $this->tag_h5_containers = $this->containers_Inline; /* <h1> - HEADING 6 Attributes = h6 %attrs; Containers = h6 %Inline; */ $this->tag_h6_attributes = $this->attributes_attrs; $this->tag_h6_containers = $this->containers_Inline; /* <ul> - UL Attributes = ul %attrs; Containers = ul (li)+; */ $this->tag_ul_attributes = $this->attributes_attrs; $this->tag_ul_containers = array("li"); /* <ol> - OL Attributes = ol %attrs; Containers = ol (li)+; */ $this->tag_ol_attributes = $this->attributes_attrs; $this->tag_ol_containers = array("li"); /* <li> - LI Attributes = li %attrs; Containers = li %Flow; */ $this->tag_li_attributes = $this->attributes_attrs; $this->tag_li_containers = $this->containers_Flow; /* <dl> - DL Attributes = dl %attrs; Containers = dl (dt|dd)+; */ $this->tag_dl_attributes = $this->attributes_attrs; $this->tag_dl_containers = array("dt","dd"); /* <dt> - DT Attributes = dt %attrs; Containers = dt %Inline; */ $this->tag_dt_attributes = $this->attributes_attrs; $this->tag_dt_containers = $this->containers_Inline; /* <dd> - DD Attributes = dt %attrs; Containers = dt %Flow; */ $this->tag_dd_attributes = $this->attributes_attrs; $this->tag_dd_containers = $this->containers_Flow; /* <address> - ADDRESS Attributes = address %attrs; Containers = address %Inline; */ $this->tag_address_attributes = $this->attributes_attrs; $this->tag_address_containers = $this->containers_Inline; /* <hr> - HORIZONTAL CUT Attributes = hr %attrs Containers = hr EMPTY */ $this->tag_hr_attributes = $this->attributes_attrs; $this->tag_hr_containers = array(); /* <pre> - PREDEFINED TEXT Attributes = pre %attrs; Containers = pre %pre.content; */ $this->tag_pre_attributes = $this->attributes_attrs; $this->tag_pre_containers = $this->containers_pre_content; /* <blockquote> - BLOCKQUOTE Attributes = blockquote %attrs , cite; Containers = blockquote %Block; */ $this->tag_blockquote_attributes = array_merge($this->attributes_attrs,array("cite")); $this->tag_blockquote_containers = $this->containers_Block; /* <ins> - INS Attributes = ins %attrs , cite , datetime; Containers = ins %Flow; */ $this->tag_ins_attributes = array_merge($this->attributes_attrs,array("cite"),array("datetime")); $this->tag_ins_containers = $this->containers_Flow; /* <del> - DEL Attributes = del %attrs , cite , datetime; Containers = del %Flow; */ $this->tag_del_attributes = array_merge($this->attributes_attrs,array("cite"),array("datetime")); $this->tag_del_containers = $this->containers_Flow; /* <a> - A Attributes = a %attrs , %focus , charset , type , name , href , hreflang , rel , rev , shape , coords; */ $this->tag_a_attributes = array_merge($this->attributes_attrs,$this->attributes_focus,array("charset"),array("type"),array("name"),array("href"),array("hreflang"),array("rel"),array("rev"),array("shape"),array("coords")); /* <span> - SPAN Attributes = span %attrs; Containers = span %Inline; */ $this->tag_span_attributes = $this->attributes_attrs; $this->tag_span_containers = $this->containers_Inline; /* <bdo> - BDO Attributes = bdo %coreattrs , %events , lang , dir; */ $this->tag_bdo_attributes = array_merge($this->attributes_coreattrs,$this->attributes_events,array("lang"),array("dir")); /* <br> - NEWLINE Attributes = br %coreattrs Containers = br EMPTY */ $this->tag_br_attributes = $this->attributes_coreattrs; $this->tag_br_containers = array(); /* <em> - EM Attributes = em %attrs; Containers = em %Inline; */ $this->tag_em_attributes = $this->attributes_attrs; $this->tag_em_containers = $this->containers_Inline; /* <strong> - STRONG Attributes = strong %attrs; Containers = strong %Inline; */ $this->tag_strong_attributes = $this->attributes_attrs; $this->tag_strong_containers = $this->containers_Inline; /* <dfn> - DFN Attributes = dfn %attrs; Containers = dfn %Inline; */ $this->tag_dfn_attributes = $this->attributes_attrs; $this->tag_dfn_containers = $this->containers_Inline; /* <code> - CODE Attributes = code %attrs; Containers = code %Inline; */ $this->tag_code_attributes = $this->attributes_attrs; $this->tag_code_containers = $this->containers_Inline; /* <samp> - SAMP Attributes = samp %attrs; Containers = samp %Inline; */ $this->tag_samp_attributes = $this->attributes_attrs; $this->tag_samp_containers = $this->containers_Inline; /* <kbd> - KBD Attributes = kbd %attrs; Containers = kbd %Inline; */ $this->tag_kbd_attributes = $this->attributes_attrs; $this->tag_kbd_containers = $this->containers_Inline; /* <var> - VAR Attributes = var %attrs; Containers = var %Inline; */ $this->tag_var_attributes = $this->attributes_attrs; $this->tag_var_containers = $this->containers_Inline; /* <cite> - CITE Attributes = cite %attrs; Containers = cite %Inline; */ $this->tag_cite_attributes = $this->attributes_attrs; $this->tag_cite_containers = $this->containers_Inline; /* <abbr> - ABBR Attributes = abbr %attrs; Containers = abbr %Inline; */ $this->tag_abbr_attributes = $this->attributes_attrs; $this->tag_abbr_containers = $this->containers_Inline; /* <acronym> - ACRONYM Attributes = acronym %attrs; Containers = acronym %Inline; */ $this->tag_acronym_attributes = $this->attributes_attrs; $this->tag_acronym_containers = $this->containers_Inline; /* <q> - Q Attributes = q %attrs , cite; Containers = q %Inline; */ $this->tag_q_attributes = array_merge($this->attributes_attrs,array("cite")); $this->tag_q_containers = $this->containers_Inline; /* <sub> - SUB Attributes = sub %attrs; Containers = sub %Inline; */ $this->tag_sub_attributes = $this->attributes_attrs; $this->tag_sub_containers = $this->containers_Inline; /* <sup> - SUP Attributes = sup %attrs; Containers = sup %Inline; */ $this->tag_sup_attributes = $this->attributes_attrs; $this->tag_sup_containers = $this->containers_Inline; /* <tt> - TT Attributes = tt %attrs; Containers = tt %Inline; */ $this->tag_tt_attributes = $this->attributes_attrs; $this->tag_tt_containers = $this->containers_Inline; /* <i> - I Attributes = i %attrs; Containers = i %Inline; */ $this->tag_i_attributes = $this->attributes_attrs; $this->tag_i_containers = $this->containers_Inline; /* <b> - B Attributes = b %attrs; Containers = b %Inline; */ $this->tag_b_attributes = $this->attributes_attrs; $this->tag_b_containers = $this->containers_Inline; /* <big> - BIG Attributes = big %attrs; Containers = big %Inline; */ $this->tag_big_attributes = $this->attributes_attrs; $this->tag_big_containers = $this->containers_Inline; /* <small> - SMALL Attributes = small %attrs; Containers = small %Inline; */ $this->tag_small_attributes = $this->attributes_attrs; $this->tag_small_containers = $this->containers_Inline; /* <object> - OBJECT Attributes = object %attrs , declare , classid , codebase , data , type , codetype , archive , standby , height , width , usemap , name , tabindex; */ $this->tag_object_attributes = array_merge($this->attributes_attrs,array("declare"),array("classid"),array("codebase"),array("data"),array("type"),array("codetype"),array("archive"),array("standby"),array("height"),array("width"),array("usemap"),array("name"),array("tabindex")); /* <param> - PARAM Attributes = param id , name , value , valuetype , type; */ $this->tag_param_attributes = array_merge(array("id"),array("name"),array("value"),array("valuetype"),array("type")); /* <img> - IMAGE Attributes = img %attrs , src , alt , longdesc , height , width , usemap , ismap; */ $this->tag_img_attributes = array_merge($this->attributes_attrs,array("src"),array("alt"),array("longdesc"),array("height"),array("width"),array("usemap"),array("ismap")); /* <map> - MAP Attributes = map %i18n , %events , id , class , style , title , name; */ $this->tag_map_attributes = array_merge($this->attributes_i18n,$this->attributes_events,array("id"),array("class"),array("style"),array("title"),array("name")); /* <area> - AREA Attributes = area %attrs , %focus , %Shape , coords , href , nohref , alt; */ $this->tag_area_attributes = array_merge($this->attributes_attrs,$this->attributes_focus,$this->attributes_Shape,array("coords"),array("href"),array("nohref"),array("alt")); /* <form> - FORM Attributes = form %attrs, action , method , enctype , onsubmit , onreset , accept , accept-charset */ $this->tag_form_attributes = array_merge($this->attributes_attrs,array("action"),array("method"),array("enctype"),array("onsubmit"),array("onreset"),array("accept"),array("accept-charset")); /* <label> - LABER Attributes = label %attrs, for , accesskey , onfocus , onblur; */ $this->tag_label_attributes = array_merge($this->attributes_attrs,array("for"),array("accesskey"),array("onfocus"),array("onblur")); /* <input> - INPUT Attributes = input %attrs, %focus , type , name , value , checked , disabled , readonly , size , maxlength , src , alt , usemap , onselect , onchange , accept; */ $this->tag_label_attributes = array_merge($this->attributes_attrs,$this->attributes_focus,array("type"),array("name"),array("value"),array("checked"),array("disabled"),array("readonly"),array("size"),array("maxlength"),array("alt"),array("usemap"),array("onselect"),array("onchange"),array("accept")); /* [60] => <!ATTLIST select %attrs; name CDATA #IMPLIED size %Number; #IMPLIED multiple (multiple) #IMPLIED disabled (disabled) #IMPLIED tabindex %Number; #IMPLIED onfocus %Script; #IMPLIED onblur %Script; #IMPLIED onchange %Script; #IMPLIED >[61] => <!ATTLIST optgroup %attrs; disabled (disabled) #IMPLIED label %Text; #REQUIRED >[62] => <!ATTLIST option %attrs; selected (selected) #IMPLIED disabled (disabled) #IMPLIED label %Text; #IMPLIED value CDATA #IMPLIED >[63] => <!ATTLIST textarea %attrs; %focus; name CDATA #IMPLIED rows %Number; #REQUIRED cols %Number; #REQUIRED disabled (disabled) #IMPLIED readonly (readonly) #IMPLIED onselect %Script; #IMPLIED onchange %Script; #IMPLIED >[64] => <!ATTLIST fieldset %attrs; >[65] => <!ATTLIST legend %attrs; accesskey %Character; #IMPLIED >[66] => <!ATTLIST button %attrs; %focus; name CDATA #IMPLIED value CDATA #IMPLIED type (button|submit|reset) "submit" disabled (disabled) #IMPLIED >[67] => <!ATTLIST table %attrs; summary %Text; #IMPLIED width %Length; #IMPLIED border %Pixels; #IMPLIED frame %TFrame; #IMPLIED rules %TRules; #IMPLIED cellspacing %Length; #IMPLIED cellpadding %Length; #IMPLIED >[68] => <!ATTLIST caption %attrs; >[69] => <!ATTLIST colgroup %attrs; span %Number; "1" width %MultiLength; #IMPLIED %cellhalign; %cellvalign; >[70] => <!ATTLIST col %attrs; span %Number; "1" width %MultiLength; #IMPLIED %cellhalign; %cellvalign; >[71] => <!ATTLIST thead %attrs; %cellhalign; %cellvalign; >[72] => <!ATTLIST tfoot %attrs; %cellhalign; %cellvalign; >[73] => <!ATTLIST tbody %attrs; %cellhalign; %cellvalign; >[74] => <!ATTLIST tr %attrs; %cellhalign; %cellvalign; >[75] => <!ATTLIST th %attrs; abbr %Text; #IMPLIED axis CDATA #IMPLIED headers IDREFS #IMPLIED scope %Scope; #IMPLIED rowspan %Number; "1" colspan %Number; "1" %cellhalign; %cellvalign; >[76] => <!ATTLIST td %attrs; abbr %Text; #IMPLIED axis CDATA #IMPLIED headers IDREFS #IMPLIED scope %Scope; #IMPLIED rowspan %Number; "1" colspan %Number; "1" %cellhalign; %cellvalign; >*/ $this->tag_p = $this->gen_attrs; array_push($this->tag_link,"charset","href","hreflang","type","rel","rev","media"); $this->buffer($this->doctype); $this->buffer("Sayfa başladı"); print_r($this->tag_body); } function flush () { $this->buffer("Sayfa bitti"); echo $this->buffers; } function buffer ($string) { $this->buffers = $this->buffers . $string; } function p () { $this->argsnum = func_num_args(); if ( $this->argsnum == 2 ) { $this->buffer("<p " . func_get_arg($this->argsnum-2) . ">" . func_get_arg($this->argsnum-1) . "</p>"); } else if ( $this->argsnum == 1 ) { $this->buffer("<p>" . func_get_arg($this->argsnum-1) . "</p>"); } else { $this->buffer("<p>" . func_get_arg($this->argsnum-1) . "</p>"); } } function as_cdata ($string) { } function as_name ($string) { } function as_number ($string) { }}$xhtml = new xhtml();$xhtml->p("-class=nema","Lorem ipsum dolor sit amet");$xhtml->p("Ikinci paragraf");$s = serialize($xhtml);$fp = fopen("./test.txt","w");fwrite($fp,$s);fclose($fp);$xhtml->flush();?><samp> Lorem ipsum dolor sit amet lorem ipsum dolor sit amet</samp>