guyz i need your help...
i just want your idea on how to check if HTML TAGS are CLOSED...
how?
any codes: asp, vbscript, javascript, html, css, etc...
thanks!
yeah! bling bling men...abz'
guyz i need your help...
i just want your idea on how to check if HTML TAGS are CLOSED...
how?
any codes: asp, vbscript, javascript, html, css, etc...
thanks!
yeah! bling bling men...abz'
use an html editor or any text editor that has syntax highlighting. it makes coding and debugging a lot faster.
i recommend using notepad++ (freeware) or ultra edit (30 days trial).
or you can just simply practice syntax indenting so you can easily track down which tags weren't closed.
that's not what i mean...
what i mean bai kay dili ang editors ang mo-detect ani... ako pasabot nga ang CODES sa programmer ang mka padetect ani
or kung naay built in functions pwede pod
example:
javascript, vbscript, asp, php etc...
yeah! bling bling men...abz'
aw ok... sorry mao akong pagsabot. hehe ^___^
its quite simple really... i have written a quick and dirty php code of what you're looking for. it involves three files.
1- html form (incase you want it to be submitted) (html_submit.html)
2- an html obfuscater written in php (check_tags.php)
3- a sample html file for your html obfuscater (sample.html)
html_submit.html
check_tags.phpCode:<html> <head> <title>Check HTML Tags</title> </head> <body> <form action="check_tags.php" method="post" enctype="multipart/form-data" target="_parent"> <input name="file" type="file" id="file"> <input type="submit" name="Submit" value="Submit" /> </form> </body> </html>
sample.htmlCode:<? $htmlFile = $_FILES['file']['name']; echo "<p>Checking $htmlFile...</p>"; $handle = fopen($htmlFile, "r"); $contents = stripslashes(fread($handle, filesize($htmlFile))); fclose($handle); $openFile = strtok($contents, "<"); $open = 0; $close = 0; $count = 0; while ($openFile !== false) { if (strstr($openFile, ">")) { $x = substr($openFile, 0, strpos($openFile, ">")); if (strstr($x, "/")) { $close++; } else { $open++; } } $openFile = strtok("<"); $count++; } echo "There are $open open tags.<br>"; echo "There are $close close tags.<br>"; echo "Total tags found: $count<br><br>"; if ($open !== $close) { if ($open>$close) $i = $open-$close; echo "Warning there are $i unclosed tag/s."; } ?>
Note: there is an unclosed anchor tag in this sample.Code:<html> <head> <title>Untitled Document</title> </head> <body> <p> Some table... </p> <table> <tr> <td>Row1</td> <td>Row2</td> <td>Row3</td> </tr> </table> <p>Some text...</p> <p><a href="#link">Broken link</p> </body> </html>
although it only works with simple html documents... kung imong i-parse na html document naay css or javascript sa source code, then mo-generate na cya og error.
ok lang bro... at least you've help me...Originally Posted by flashfreak
i will try to study your codes later...
im copying the codes and paste it w/ the filename you have given...
thank you very much
yeah! bling bling men...abz'
hi to all.. lam nyo code sa like button??
Ayo ..hehe
kinsa butan hehe patabang sa html
Similar Threads |
|