[email protected] Posted August 18, 2006 Share Posted August 18, 2006 what is the PHP code for embedding a HTML document. cuz i'm technically trying to make this code (this is html) :<iframe src="http://www.game-monitor.com/server-stat.php?ip=8.6.3.213:27015&style=1&text=000000&link=0000FF&back=F2F6FC&border=8F9DB4&body=" allowtransparency="true" background-color="transparent" width="200" height="210" frameborder="0" scrolling="no"></iframe>but that won't work with PHP. it HAS to be PHP. (long story)so i figured i'd just embed the HTML document with that code into the PHP document and it would work. am i rite? Link to comment https://forums.phpfreaks.com/topic/17999-html-document-embed/ Share on other sites More sharing options...
Jeremysr Posted August 18, 2006 Share Posted August 18, 2006 include()?[code=php:0]include ("something.html");[/code]Or echo?[code=php:0]echo '<iframe src="http://www.game-monitor.com/server-stat.php?ip=8.6.3.213:27015&style=1&text=000000&link=0000FF&back=F2F6FC&border=8F9DB4&body=" allowtransparency="true" background-color="transparent" width="200" height="210" frameborder="0" scrolling="no"></iframe>';[/code] Link to comment https://forums.phpfreaks.com/topic/17999-html-document-embed/#findComment-77066 Share on other sites More sharing options...
ryanlwh Posted August 18, 2006 Share Posted August 18, 2006 hmm i guess you're talking about 'include' or 'file_get_contents'make sure you strip away the header codes... it probably will output correctly, but sometimes you might get unexpected results. Link to comment https://forums.phpfreaks.com/topic/17999-html-document-embed/#findComment-77067 Share on other sites More sharing options...
[email protected] Posted August 19, 2006 Author Share Posted August 19, 2006 you mean the <head> codes? they arent in there at all. or did you mean all of the ">" and "<" ?cuz when i do this, it dosn't work: echo "<iframe src="http://www.game-monitor.com/server-stat.php?ip=8.6.3.213:27015&style=1&text=000000&link=0000FF&back=F2F6FC&border=8F9DB4&body=" allowtransparency="true" background-color="transparent" width="200" height="210" frameborder="0" scrolling="no"></iframe>"; Link to comment https://forums.phpfreaks.com/topic/17999-html-document-embed/#findComment-77072 Share on other sites More sharing options...
Jeremysr Posted August 19, 2006 Share Posted August 19, 2006 That's because you're using double-quotes inside of what you're echoing. Use single-quotes to echo it:[code=php:0]echo '<iframe src="http://www.game-monitor.com/server-stat.php?ip=8.6.3.213:27015&style=1&text=000000&link=0000FF&back=F2F6FC&border=8F9DB4&body=" allowtransparency="true" background-color="transparent" width="200" height="210" frameborder="0" scrolling="no"></iframe>';[/code] Link to comment https://forums.phpfreaks.com/topic/17999-html-document-embed/#findComment-77075 Share on other sites More sharing options...
[email protected] Posted August 19, 2006 Author Share Posted August 19, 2006 awesome. that worked. thanks!!! Link to comment https://forums.phpfreaks.com/topic/17999-html-document-embed/#findComment-77081 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.