Page 1 of 1

use SERVER_ADDR in IFRAME

Posted: Tue Nov 15, 2011 10:21 pm
by linsteina
Hi team,

Is that possible to use $_SERVER['SERVER_ADDR'] in IFRAME src ?

my code in html:

<html>

<IFRAME src="http://<?php echo $_SERVER['SERVER_ADDR']; ?>:80/ip.html >
</IFRAME>

</html>

But it does not display ip.html but blank.

Any suggestions?

Thanks

Re: use SERVER_ADDR in IFRAME

Posted: Wed Nov 16, 2011 3:42 pm
by social_experiment
If you echo $_SERVER['SERVER_ADDR'] normally, sans iframe; what is displayed?