Jump to content

Archived

This topic is now archived and is closed to further replies.

JustinMs66@hotmail.com

HTML Document Embed?

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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>";

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.