php PHP Script
Download PyroCMS IP Address PluginDownload PyroCMS IP Address Plugin
Download Count: 84
Date Added: Saturday, 10-Sep-11 17:34:05 CDT
Tags: pyrocms, codeigniter, php, ip address, session, userdata

This is a simple PyroCMS plugin that uses session data to display the visitors IP address.

Place the IP Address plugin file in your PyroCMS shared_addons/plugins folder and you're all set to go

To use the plugin, add this tag to your page or template:

{{ ip:address text="Your IP address is" }}

Hope you find this useful!

File Name: ip.php - Code Type: PHP
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
 * This is a simple plugin to show a visitors IP address in PyroCMS
 *
 * @author              Larry Price
 * @website             http://lfwebpro.com
 * @package     IP Address plugin
 */
class Plugin_Ip extends Plugin
{
        /**
         *
         * Usage:
         * {pyro:ip:address text="Your IP address is"}
         *
         * Required attributes
         *      none
         * @return      string
         */
        function address()
        {
                $data = '';
                if ($this->attribute('text')) {
                        $data .= $this->attribute('text') .' ';
                }
                $data .= $this->session->userdata('ip_address');
 
                return "$data";
        }
}
 
/* End of file ip.php */
Parsed in 0.182 seconds - Rate: 3.31 KB/s - GeSHi version: 1.0.8.10

Hope you find this helpful! If you have any questions, please leave a comment.


  • PHP
  • Scripts
  • MS
  • Office
  • Templates
  • and
  • Files
  • Assorted
  • Linux
  • Bash
  • Scripts
  • Perl
  • Scripts
  • PDF
  • FIles
  • MS
  • Excel
  • 2003
  • Template
  • employment
  • tools
  • job
  • search
  • tools
  • spreadsheet
  • Job
  • Search
  • Spreadsheet
  • Template
  • bash
  • shell
  • script
  • file
  • backup
  • linux
  • gzip
  • tar
  • File
  • Backup
  • Script
  • Transmission
  • shell
  • script
  • public
  • torrent
  • private
  • torrent
  • Bit
  • Torrent
  • Transmission
  • BitTorrent
  • Completion
  • Script
  • Transmission
  • shell
  • script
  • torrent
  • information
  • Bit
  • Torrent
  • Transmission
  • Bit
  • Torrent
  • Get
  • Torrent
  • Info
  • bash
  • shell
  • script
  • add
  • user
  • samba
  • samba
  • user
  • add
  • samba
  • user
  • linux
  • command
  • line
  • Add
  • System
  • and
  • Samba
  • User
  • geshi
  • pyrocms
  • php
  • codeigniter
  • PyroCMS/CodeIgniter
  • Geshi
  • Helper
  • File
  • geshi
  • pyrocms
  • php
  • codeigniter
  • GeSHi
  • Code
  • Highlighter
  • plugin
  • for
  • PyroCMS
  • perl
  • cgi
  • hit
  • counter
  • Simple
  • Perl
  • Hit
  • Counter
  • pyrocms
  • codeigniter
  • php
  • ip
  • address
  • session
  • userdata
  • PyroCMS
  • IP
  • Address
  • Plugin
  • Soyo
  • SY5SSM
  • Socket
  • 7
  • Motherboard
  • Quick
  • Start
  • Guide
  • Soyo
  • SY5SSM
  • Socket
  • 7
  • Motherboard
  • Quick
  • Start
  • Guide
  • Home
  • web
  • designit
  • supportlinuxphpbash
  • PRIVACY
  • Statement
  • LEGAL
  • Disclaimer
  • Ebay
  • Listings
  • Soyo
  • Motherboard
  • PDF
  • Why
  • I
  • Like
  • the
  • HoneyPi
  • Brand
  • IR
  • Receiver
  • Module
  • for
  • the
  • Raspberry
  • Pi
  • Using
  • GeSHi
  • Highlighter
  • with
  • PyroCMS/CodeIgniter
  • Easy
  • as
  • 1
  • 2
  • 3
  • PHP
  • Stuff
  • Raspberry
  • PI