Jump to content

Archived

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

vetev

ip address

Recommended Posts

does anyone know the code to display a users ip address on my webpage.
It must be just the ip (numbers) very simple as i plan inserting code into photoshop anyways.

I would like as basic as possible that a .html page can read.
As when i save my work it will be .html

thanks, sorry for posting under php but you have good knowlage

Share this post


Link to post
Share on other sites
Hi i can never get this code to work just shows blank html page.

how do i install tis and what do i name the page to test.html show white block, i must have html page

Share this post


Link to post
Share on other sites
You must save the file with a PHP extension unless your PHP installation is configured to parse html pages.

Share this post


Link to post
Share on other sites
the server may not allow php to be shown on pages with the .html extension. Is this site on an Apache server?

if so, you can add this to a .htaccess file to get your html pages to be read as php

AddType application/x-httpd-php .html .php .htm

Share this post


Link to post
Share on other sites
this is location of my webpage .php on apache

my site is vetev.com yes it is apache, i run php-nuke from the site fine why wont it allow php page when it allows hundreds of nuke file which are .php

Share this post


Link to post
Share on other sites
the server might not allow PHP on pages with the .html extension

if you change your page to a .php extension is should work fine. if you can't change it to .php & you MUST have it as .html, then use:

AddType application/x-httpd-php .html .php .htm

This will force the server to read .html pages as .php pages & your PHP code will work.

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.