mod_showip.php:
PHP-Code:
<?php
/**
* @version $Id: mod_random_image.php 10381 2008-06-01 03:35:53Z pasamio $
* @package Joomla
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
$ipadresse =GetIP();
echo "Deine IP ist: $ipadresse";
function GetIP()
{
if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown"))
$ip = getenv("HTTP_CLIENT_IP");
else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown"))
$ip = getenv("HTTP_X_FORWARDED_FOR");
else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown"))
$ip = getenv("REMOTE_ADDR");
else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown"))
$ip = $_SERVER['REMOTE_ADDR'];
else
$ip = "unknown";
return($ip);
}/*-------GetIP()-------*/
?>
mod_showip.xml:
PHP-Code:
<?xml version="1.0" encoding="utf-8"?>
<install type="module" version="1.5.0">
<name>Show IP</name>
<creationDate>March 2010</creationDate>
<author>DMS</author>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>webmaster@worldwidewaiting.de</authorEmail>
<authorUrl>www.bwforum-online.de</authorUrl>
<version>1.0.7</version>
<description>IP Adresse anzeigen</description>
<files>
<filename module="mod_showip">mod_showip.php</filename>
</files>
<params>
<param name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="PARAMMODULECLASSSUFFIX" />
</params>
</install>
Die beiden Files ins Verzeichnis mod_showip, zippen und hochladen & installieren.
Demo: http://www.classic-josephine.de/ , Modul befindet sich ganz unten links
Gruss, Martin
Lesezeichen