Action: GetIP

2
Current version:
Credits:

{{getip}}


/action/getip.php

PHP
<?php
    // determine IP
    $tpl->ip = $ip = $this->get_user_ip();
    
    // resolve IP and determine host
    $tpl->host = gethostbyaddr($ip);

/action/template/getip.tpl

HTML
[ === main === ]

[ ' ip ' ]<br>
[ ' host ' ]<br>

Read comments (2 comments)