General Question

Lost_World's avatar

Does anyone know of a widget to display the host ip on a website?

Asked by Lost_World (1231points) January 20th, 2011

This is a bit of an odd question, but one of you might know.

I am running a little game server for a few friends, with no static ip. Does anyone know of some sort of widget that I can stick on my website to display the currant public ip of the server so they can connect?

Observing members: 0 Composing members: 0

4 Answers

Lost_World's avatar

It might also be cool if there were some way to make the ip post to twitter.

poisonedantidote's avatar

You will need to use a server side language. Does your server support PHP? you could do it with that. It should only be a couple of lines of code to do it.

EDIT:

You may want to take a look at these links…

http://stackoverflow.com/questions/4420468/php-display-server-ip-address

http://www.htmlcodetutorial.com/help/ntopic7670.html

They seem to have some code you could try out.

omph's avatar

With php

<?php
echo $_SERVER[‘SERVER_ADDR’];
?>

Outputs http://stfudamnit.com/server.php

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther