FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Visitor ip PHP (E107)





ldnet
I have been searching for a php script that would show a visitors ip address in e107 menu and it took me ages anyways then i tryed to make my own and i actually did it had a few errors but now its all working and its all good check it out.

Code:
<?php
// visitorip_menu.php
// This script shows a visitor his IP address
// Suggestion: Make the menu visible to "Guest Only" if you want to show it for unregistered guests only

$ip = getip();
$text = "<div style='text-align:center'>Your IP address is:<br />".$ip."<br /></div>";

if(USER){
        $caption = "Hello ".USERNAME."";
        }else{
        $caption = "Hello Guest";
        }
$ns -> tablerender($caption, $text);

?>   


Hope you guys like the code.

-Peace.[/code]
Guest
@ldnet
I have been searching for a php script that would show a visitors ip address in e107 menu and it took me ages anyways then i tryed to make my own and i actually did it had a few errors but now its all working and its all good check it out.

Code:
<?php
// visitorip_menu.php
// This script shows a visitor his IP address
// Suggestion: Make the menu visible to "Guest Only" if you want to show it for unregistered guests only

$ip = getip();
$text = "<div style='text-align:center'>Your IP address is:<br />".$ip."<br /></div>";

if(USER){
        $caption = "Hello ".USERNAME."";
        }else{
        $caption = "Hello Guest";
        }
$ns -> tablerender($caption, $text);

?>   


Hope you guys like the code.

-Peace.[/code]
==============

You can get several client or server information using get environment information function ( getenv("string param") )

for example, usage for reading client IP address ...
echo getenv('REMOTE_ADDR');

or simply using superglobal variable...
echo $_SERVER['REMOTE_ADDR'];
pagaldivanna
thanx....i was looking 4 that....is that code work......i should try....thanx again
Related topics
PHP IP Ban
php script sows Ip
Ip Banning Using Php
I need PHP hits code
poll met ip check
Ban Users Ip: 72.265.31.23
Hostng off your computer.
Tracing an IP with PHP
e107 php???
installation: Drupal, Joomla, PHP-BB, SMF, e107, and more
PHP IP tracking script ?
How to get the IP address of People who Visit my Site
Visitor information
Show People's IP In a Pic
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.