Sinisterly
easy html to php convert - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: PHP (https://sinister.li/Forum-PHP)
+--- Thread: easy html to php convert (/Thread-easy-html-to-php-convert)



easy html to php convert - krislovesholly - 11-22-2012

Basically i have my html code here:

Code:
<html> <head> <embed src="http://www.youtube.com/watch?v=D3-vBBQKOYU&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="1" height="1"></embed> <title>Kris Pro Hacks</title> <style type="text/css"> body { background-color:#0; background-attachment: fixed; font-family:sans-serif; } #content { margin:auto; background:url() #000; width:700px; text-align:center; color:green; } #footer { height:100px; width:500px; } </style> </head> <body onload=writetext() onLoad="setTimeout('delayer()', 2000)"> <div id="content"> <SCRIPT language=JavaScript> msg = new Array(); msg[0] = "<h1>+*¨^¨*+ Hacked By Kris Pro Hacks AKA TheArmyKid +*¨^¨*+</h1>"; msg[1] = "<br/><br/>°º¤ø,¸¸,ø¤º°`°º¤ø,¸ HaHaHaHaHa °º¤ø,¸¸,ø¤º°`°º¤ø,¸<br/><br/>"; msg[2] = "<br/><br/>°º¤ø,¸¸,ø¤º°`°º¤ø,¸ Site-Down-! °º¤ø,¸¸,ø¤º°`°º¤ø,¸<br/><br/>"; msg[3] = "<br/><br/>»-(¯`v´¯)-» We All Love Crack Hack Forum »-(¯`v´¯)-»<br/><br/>"; msg[4] = "<br/><br/>°l||l° If I was You Id Consider Upgrading Your Security Cause Ill Be Back :P °l||l°<br/><br/> "; msg[5] = "<br/><br/>Hacked By Kris Pro Hacks AKA TheArmyKid<br/><br/>"; msg[6] = "<br/><br/>!!!!!!!!--Expect more from us--!!!!!!!!"; msg[7] = "<br/><br/>We Are Hackers And As You Know We Dont Obey The Law "; msg[7] = "<br/><br/>Why Your There Watching This Please Like My FaceBook Page http://www.facebook.com/thehackerscrib<br/><br/>"; text1 = ""; text2 = ""; count = 0; count2 = 0; text = msg[0].split(""); function writetext() { text1 = text2 + "<font color='#FFFFFF'>" + text[count] + "</font>"; text2 += text[count]; document.all["nothing"].innerHTML = text1; if (count < text.length-1){ count++; setTimeout('writetext()', 35); } else { count = 0; if (count2 != 15) { count2++; text2 += ""; text = eval('msg['+count2+'].split("")'); setTimeout('writetext()', 1); } } } </SCRIPT> <SCRIPT LANGUAGE="JavaScript"> <!-- Disable function disableselect(e){ return false } function reEnable(){ return true } //if IE4+ document.onselectstart=new Function ("return false") document.oncontextmenu=new Function ("return false") //if NS6 if (window.sidebar){ document.onmousedown=disableselect document.onclick=reEnable } //--> </script> <DIV id=nothing style="FONT-FAMILY: 'Courier'"> <P>©©©©©©©© Kris ProHacks/TheArmyKid ©©©©©©©©</P> <div id="footer"> </div> </body> </head> </html>

2.And i want to change this to php

3.So im going to go to http://www.yellowpipe.com/yis/tools/HTML_converter/

4.paste my code into the box and choose the html--->php button

5.Now my results is :

6.
Code:
<?php echo "<html>\n"; echo "\n"; echo "<head>\n"; echo "<embed src=\"http://www.youtube.com/watch?v=D3-vBBQKOYU&autoplay=1\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"1\" height=\"1\"></embed> \n"; echo "<title>Kris Pro Hacks</title>\n"; echo "<style type=\"text/css\">\n"; echo "body {\n"; echo "\n"; echo " background-color:#0;\n"; echo "background-attachment: fixed;\n"; echo "font-family:sans-serif;\n"; echo "\n"; echo "\n"; echo "\n"; echo "}\n"; echo "#content {\n"; echo "margin:auto;\n"; echo "background:url() #000;\n"; echo "width:700px;\n"; echo "text-align:center;\n"; echo "color:green;\n"; echo "}\n"; echo "#footer {\n"; echo "height:100px;\n"; echo "width:500px;\n"; echo "}\n"; echo "</style>\n"; echo "</head>\n"; echo "\n"; echo "\n"; echo "<body onload=writetext() onLoad=\"setTimeout('delayer()', 2000)\">\n"; echo "\n"; echo "\n"; echo "\n"; echo "<div id=\"content\">\n"; echo "\n"; echo "<SCRIPT language=JavaScript>\n"; echo "\n"; echo "\n"; echo "\n"; echo "msg = new Array(); \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "msg[0] = \"<h1>+*¨^¨*+ Hacked By Kris Pro Hacks AKA TheArmyKid +*¨^¨*+</h1>\";\n"; echo "\n"; echo "\n"; echo "\n"; echo "msg[1] = \"<br/><br/>°º¤ø,¸¸,ø¤º°`°º¤ø,¸ HaHaHaHaHa °º¤ø,¸¸,ø¤º°`°º¤ø,¸<br/><br/>\";\n"; echo "\n"; echo "\n"; echo "msg[2] = \"<br/><br/>°º¤ø,¸¸,ø¤º°`°º¤ø,¸ Site-Down-! °º¤ø,¸¸,ø¤º°`°º¤ø,¸<br/><br/>\";\n"; echo "\n"; echo "msg[3] = \"<br/><br/>»-(¯`v´¯)-» We All Love Crack Hack Forum »-(¯`v´¯)-»<br/><br/>\";\n"; echo "\n"; echo "msg[4] = \"<br/><br/>°l||l° If I was You Id Consider Upgrading Your Security Cause Ill Be Back :P °l||l°<br/><br/> \";\n"; echo "\n"; echo "\n"; echo "msg[5] = \"<br/><br/>Hacked By Kris Pro Hacks AKA TheArmyKid<br/><br/>\"; \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "msg[6] = \"<br/><br/>!!!!!!!!--Expect more from us--!!!!!!!!\";\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "msg[7] = \"<br/><br/>We Are Hackers And As You Know We Dont Obey The Law \"; \n"; echo "\n"; echo "\n"; echo "msg[7] = \"<br/><br/>Why Your There Watching This Please Like My FaceBook Page http://www.facebook.com/thehackerscrib<br/><br/>\";\n"; echo "\n"; echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo "text1 = \"\"; \n"; echo "\n"; echo "\n"; echo "\n"; echo "text2 = \"\"; \n"; echo "\n"; echo "\n"; echo "count = 0; \n"; echo "\n"; echo "count2 = 0; \n"; echo "\n"; echo "text = msg[0].split(\"\"); \n"; echo " \n"; echo "\n"; echo "function writetext() { \n"; echo "\n"; echo "\n"; echo "\n"; echo "text1 = text2 + \"<font color='#FFFFFF'>\" + text[count] + \"</font>\";\n"; echo "\n"; echo "\n"; echo "text2 += text[count];\n"; echo "\n"; echo "\n"; echo "document.all[\"nothing\"].innerHTML = text1; \n"; echo "\n"; echo "\n"; echo "\n"; echo "if (count < text.length-1){\n"; echo "\n"; echo "\n"; echo "\n"; echo "count++;\n"; echo "\n"; echo "\n"; echo "setTimeout('writetext()', 35);\n"; echo "\n"; echo "\n"; echo "\n"; echo "}\n"; echo "\n"; echo "\n"; echo "\n"; echo "else {\n"; echo "\n"; echo "\n"; echo "count = 0;\n"; echo "\n"; echo "\n"; echo "\n"; echo "if (count2 != 15) { \n"; echo "\n"; echo "\n"; echo "count2++;\n"; echo "\n"; echo "\n"; echo "\n"; echo "text2 += \"\"; \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "text = eval('msg['+count2+'].split(\"\")'); \n"; echo "\n"; echo "\n"; echo "\n"; echo "setTimeout('writetext()', 1);\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "}\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "}\n"; echo "\n"; echo "\n"; echo "}\n"; echo "\n"; echo "\n"; echo "\n"; echo "</SCRIPT>\n"; echo "\n"; echo "\n"; echo "\n"; echo "<SCRIPT LANGUAGE=\"JavaScript\">\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "<!-- Disable\n"; echo "\n"; echo "\n"; echo "\n"; echo "function disableselect(e){\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "return false\n"; echo "\n"; echo "\n"; echo "\n"; echo "}\n"; echo "\n"; echo "\n"; echo "\n"; echo "function reEnable(){\n"; echo "\n"; echo "\n"; echo "\n"; echo "return true\n"; echo "\n"; echo "\n"; echo "\n"; echo "}\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "//if IE4+\n"; echo "\n"; echo "\n"; echo "\n"; echo "document.onselectstart=new Function (\"return false\")\n"; echo "\n"; echo "\n"; echo "\n"; echo "document.oncontextmenu=new Function (\"return false\")\n"; echo "\n"; echo "\n"; echo "\n"; echo "//if NS6\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "if (window.sidebar){\n"; echo "\n"; echo "\n"; echo "\n"; echo "document.onmousedown=disableselect\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "document.onclick=reEnable\n"; echo "\n"; echo "\n"; echo "\n"; echo "}\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "//-->\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "</script>\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "<DIV id=nothing style=\"FONT-FAMILY: 'Courier'\">\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "<P>©©©©©©©© Kris ProHacks/TheArmyKid ©©©©©©©©</P> \n"; echo "<div id=\"footer\"> \n"; echo "</div>\n"; echo "</body>\n"; echo "</head>\n"; echo "</html>\n"; ?>

7. now i can save this as php
8.a fast way of converting your html page to php takes seconds

enjoy it Smile fastest method i know Smile


RE: easy html to php convert - compfixing - 12-23-2012

Wow, does it still work? It seems nice, I need it.

Thank for sharing though.


RE: easy html to php convert - The Real Slim Shady - 12-23-2012

This is just plain stupid. It adds so much unnecessary overhead to displaying the webpage. Yes you can output html within php but that doesnt mean you should do that with the entire file. Instead of having Apache output the html, you force it use the php module, which then just spits it back to apache to display. Its just unnecessary. Might not be noticeable on a simple site, but it is inefficient.


RE: easy html to php convert - H4R0015K - 12-23-2012

i totally agree with Geoff its just stupid and the covertor only add echo to each line.


RE: easy html to php convert - The Alchemist - 12-23-2012

Well... This is too simple stuff...
I thought it was some script that would automatically convert HTML to PHP...