The MU forums have moved to WordPress.org

how can i get IP adress (2 posts)

  1. ferasof
    Member
    Posted 16 years ago #

    how can i get the IP address for new user blogs?

  2. dsader
    Member
    Posted 16 years ago #

    Here's an mu-plugin:

    function get_blog_registration_ip () {
    	global $wpdb;
    	global $blog;
    		$ip = $wpdb->get_var( "SELECT IP FROM {$wpdb->registration_log} WHERE blog_id = ".$blog[ 'blog_id' ]."" );
    ?>
    IP: <strong><?php echo $ip; ?></strong>
    <?php
    }
    add_action('wpmublogsaction', 'get_blog_registration_ip' );
    ?>

About this Topic