It is freely avialable!!! Here is the sourcecode:
2 files are used to parse: read-tags.php --- <?php // Tag Parser v1.11 // v1.0 First release(not working) // v1.1 Edited: // Uses Regular Expressions // v1.11 Edited: // Edited to use with BTML function parseTags($file) { /* readfile... here */ $filedata = file_get_contents($file); $tag_match = "!<bttag=(\w*)>\s*(.*?)\s*</bttag>!is"; preg_match_all($tag_match, $filedata, $matches); for ($i=0; $i< count($matches[0]); $i++) { $tagname = $matches[1][$i]; $tags[$tagname] = $matches[2][$i]; } return $tags; } ?> --- btml.php --- <?php // BTML-HTML converter v1.0 // v1.0 First release // You can write precisely 1 image on the bottom, // 1 title // and 1 paragraph(you need also the <br>s in your <bttag=text>) include_once("read-tags.php"); $filename = $_GET['name']; $bttags = parseTags($filename); if ($bttags['btml'] == '') { echo "<HTML><HEAD>"; echo "<TITLE>" . $bttags['title'] . "</TITLE></HEAD><BODY>"; echo "<H1>" . $bttags['title'] . "</h1><br>"; echo $bttags['text']; if (!empty($bttags['image'])) { echo "<IMG SRC=\"" . $bttags['image'] . "\">"; } echo "</body></html>"; } ?> --- And an test BTML-file: --- <bttag=btml> </bttag> <bttag=title> Welcome to BTML page v1! </bttag> <bttag=text> Welcome to my BTML page!!! This is an experimentally version of HTML!!! <br>Bye!!! </bttag> <bttag=image> noimage.gif </bttag> --- Run it with: btml.php?name=filename.btm Example: btml.php?name=test.btm For improvements e-mail me(also if you are planning on inprovements) or reply if you have a inprovement ready. Regards, Bas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php