inferium Posted December 7, 2008 Share Posted December 7, 2008 Let's say that this is an actually good illustration. I want to take a piece of displayed html and have the code for it layed out in a text box at the bottom of the page (I'm finding it hard to describe this in words so this paint image is the best I can do, sorry guys !!! ) Would this be a php maneuver, or is this done through other means? Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/ Share on other sites More sharing options...
jnerotrix Posted December 7, 2008 Share Posted December 7, 2008 If you already have the code you can use his <textarea readonly="1" rows="5" cols="50"> //CODES GO HERE\\ </textarea> Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/#findComment-708730 Share on other sites More sharing options...
DeanWhitehouse Posted December 7, 2008 Share Posted December 7, 2008 Only other thing i can suggest is using maybe an iframe or ajax and then view-source:http://www.website.com using a regex to find certain bits you want which you would surround in either certain tags or comments. Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/#findComment-708818 Share on other sites More sharing options...
DarkWater Posted December 8, 2008 Share Posted December 8, 2008 Only other thing i can suggest is using maybe an iframe or ajax and then view-source:http://www.website.com using a regex to find certain bits you want which you would surround in either certain tags or comments. I hope you realize that view-source: is just a browser thing to make lives easier, correct? Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/#findComment-709078 Share on other sites More sharing options...
.josh Posted December 8, 2008 Share Posted December 8, 2008 <?php $html = <<<HTMLSTUFF <html> <head> <!-- header stuff here --> </head> <body> more blah blah blah <a href='http://www.ohtehblah.com'>blah!</a> </body> </html> HTMLSTUFF; echo $html; // example 1 echo "<pre>"; echo htmlentities($html); echo "</pre>"; // example 2 echo "<textarea cols = '80' rows = '10'>"; echo htmlentities($html); echo "</textarea>"; ?> Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/#findComment-709193 Share on other sites More sharing options...
inferium Posted December 8, 2008 Author Share Posted December 8, 2008 Ah, this works great. Thanks!!! Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/#findComment-709535 Share on other sites More sharing options...
DeanWhitehouse Posted December 8, 2008 Share Posted December 8, 2008 @DarkWater, yes and i hope you know you can still use PHP to get what you want from it Link to comment https://forums.phpfreaks.com/topic/135958-solved-general-coding-question/#findComment-709625 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.