Jump to content

inframe webpage(serverstatus) on mainpage


shinyo

Recommended Posts

I would like to add a serverstatus of this type :

http://status.hlstats.net/?ip=81.19.219.17:27015&qport=&game=hl&tpl=m&pic

 

php code for this :

<?php echo file_get_contents('http://beta.status.hlstats.net/?game=hl&ip=81.19.219.17&qport=27015&tpl=m&pic'); ?>

 

to my page itself, on this spot :

http://img.photobucket.com/albums/v381/kaitenvsshinyo/website1.jpg

the php-code on that particular spot :

http://img.photobucket.com/albums/v381/kaitenvsshinyo/website2.jpg

 

So my question is, what is the php code, or what do I need to do to get the serverstatus in frame on the place specified in "website1.jpg"

 

What I've tried (for several hours, only 'learned' php like yesterday) :

- html integration in the index.php

- writing my very own 'serverstatus.php' with the php code in it, then 'include' it at the given spot

- numerous other things that probably make no sense and if I told them I would get laughed at :$ :)

 

thanks a lot in advance

 

Link to comment
https://forums.phpfreaks.com/topic/51290-inframe-webpageserverstatus-on-mainpage/
Share on other sites

Top of page

 

<?php

$content = file_get_contents("http://beta.status.hlstats.net/?game=hl&ip=81.19.219.17&qport=27015&tpl=m&pic");

?>

 

 

Later in the HTML output where you want it to appear:

 

<strong>Our Server Status</strong>

<?=$content?>

 

Chigley ;)

thanks alot for the reply !

but do I have to create a new php-document, and then link it with 'include' to my index.php, or..?

 

Is it possible to kind of 'integrate' what should happen exactly using the 2nd screenshot (website2.jpg), I know I'm demanding alot :( sorry for that, but I don't really see where html comes around? Since the website is completely php, and the status-thing that should be integrated is as well :$

problem solved with an iframe :

code:

--------------------------------------------------------------------------------

<iframe width=150 height=250 scrolling=no border=0 frameborder=0 src=http://status.hlstats.net/?ip=81.19.219.17:27015&qport=&game=hl&tpl=m&pic></iframe>

 

 

tnx for reading + your time, xxx

Archived

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

×
×
  • Create New...

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.