vetev Posted April 28, 2006 Share Posted April 28, 2006 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 .htmlthanks, sorry for posting under php but you have good knowlage Quote Link to comment Share on other sites More sharing options...
bbaker Posted April 28, 2006 Share Posted April 28, 2006 <?phpecho $_SERVER['REMOTE_ADDR'];?> Quote Link to comment Share on other sites More sharing options...
vetev Posted April 28, 2006 Author Share Posted April 28, 2006 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 Quote Link to comment Share on other sites More sharing options...
ober Posted April 28, 2006 Share Posted April 28, 2006 You must save the file with a PHP extension unless your PHP installation is configured to parse html pages. Quote Link to comment Share on other sites More sharing options...
bbaker Posted April 28, 2006 Share Posted April 28, 2006 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 phpAddType application/x-httpd-php .html .php .htm Quote Link to comment Share on other sites More sharing options...
vetev Posted April 28, 2006 Author Share Posted April 28, 2006 this is location of my webpage .php on apachemy 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 Quote Link to comment Share on other sites More sharing options...
bbaker Posted April 28, 2006 Share Posted April 28, 2006 the server might not allow PHP on pages with the .html extensionif 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 .htmThis will force the server to read .html pages as .php pages & your PHP code will work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.