We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Displaying IP address on web page

esuhl
esuhl Posts: 9,409 Forumite
Part of the Furniture 1,000 Posts Name Dropper
Does anyone know a fairly reliable way to display a visitor's (external) IP address when they visit a webpage?

I've tried using Javascript and SSI but my ISP (Tiscali) doesn't seem to support it. Also, is there a way to enter the IP address into an email - like the way JavaScript can write a mailto link with a default subject line...

Sorry if I'm missing something obvious - I've been searching the web all weekend to work out how to do this!!!

Thanks is advance! :-)

Comments

  • Chippy_Minton
    Chippy_Minton Posts: 3,339 Forumite
    You've probably seen the Javascript at http://javascript.internet.com/user-details/ip-address.html.

    Try saving the web page as a .shtml file, not .htm or .html. .shtml is the extension required by SSI, which the script uses via the REMOTE_ADDR environment variable.
  • esuhl
    esuhl Posts: 9,409 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    Thanks for your help - I've tried that script and even with an .shtml extension, I just get an alert saying:

    Your IP address is: <!--#echo var="REMOTE_ADDR"-->
  • Mr_Cresote
    Mr_Cresote Posts: 21 Forumite
    Javascript on its own, can't do it, as it's a client side process, for this you will need access to a server side scripting language like ssi perl or php etc
  • thewizard
    thewizard Posts: 659 Forumite
    If you cant use SSI go to https://www.ipaddressworld.com
  • esuhl
    esuhl Posts: 9,409 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    Cheers guys! Shame I can't do it myself in Javascript... but that ipaddressworld.com thingy is just the sort of thing I need.

    I was wondering how I could set up a mailto: link to put the IP address in an email, and came across sendmyip.com that returns a Javascript string variable containing the IP address - so I can stick that in some kind of mailto: link. :-)
  • thewizard
    thewizard Posts: 659 Forumite
    There are alot of sites out their that can do computer stats including IP addresses, browser information etc. Im working on a site that can do this. Ill give the link when I'm done, as it will be 100% ad free unlike alot of these!
  • Rex_Mundi
    Rex_Mundi Posts: 6,311 Forumite
    Part of the Furniture 1,000 Posts Combo Breaker
    thewizard wrote:
    There are alot of sites out their that can do computer stats including IP addresses, browser information etc. Im working on a site that can do this. Ill give the link when I'm done, as it will be 100% ad free unlike alot of these!

    It would still be against the rules of this site. We are not allowed to post links to our own site without permission from the team. Selling or not, Ads or not, it would be regarded as advertising, which is STRICTLY against the rules of this site.

    Go and check the rules......
    How many surrealists does it take to change a lightbulb?
    ...
    ...
    ...
    ...
    Fish
  • wolfman
    wolfman Posts: 3,225 Forumite
    Very easy to do with .Net. You'd need hosting that can support it though. I take such stats for my own website. Can get the ip address, operating system, browser, browser version and more via .Net just by making a simple request statement.

    I also use JavaScript for things such as screen resolution and colour depth. Ideally I should use it for detecting the browser (as .Net isn't always accurate) but I've not got the time.
    "Boonowa tweepi, ha, ha."
  • esuhl
    esuhl Posts: 9,409 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    I'm surprised I wouldn't be allowed to post a link to my own private non-commercial page, Rex, but thanks for the tip. Where can I see a copy of the rules?

    Anyway I've got the page up and running! :-) The only thing I haven't worked out is how to check whether Java and ActiveX are installed and turned on... Does anyone know how I might be able to do that?

    If anyone would like to see my page and the scripts behind it let me know and I'll PM you the web address (hope that's not against the rules!)

    I'll have to have a look at .net - one of the things I've been meaning to do but not had the time!
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 352.5K Banking & Borrowing
  • 253.7K Reduce Debt & Boost Income
  • 454.5K Spending & Discounts
  • 245.5K Work, Benefits & Business
  • 601.4K Mortgages, Homes & Bills
  • 177.6K Life & Family
  • 259.4K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.