Go Back   FlashFXP Forums > > > >

! Requests Need a script or some sort of cool .bat file ? Ask here!

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 01-26-2005, 12:39 PM   #7
ADDiCT
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Aug 2003
Posts: 517
Default

$_SERVER["REMOTE_ADDR"] works fine, have used it already in "ioHTTPD" on LAN-parties. On the internet u might have to deal with proxyservers (force users to disable them for the RSS-feed).

Edit: something i found between al my crappy code:
Code:
    function FindUserIdByIP($ip)
    {
        $resultid = -1; // default return value
        
        $userlist = io_user_list_init();             // create userlist
        $usermask = io_user_mask_init(UINFO_IPLIST); // create usermask; we only need list of IP's
        
        // fetch userid's
        $uid = io_user_list_fetch($userlist);
        while($resultid == -1 && $uid >= 0)
        {
            $userfile = io_user_open($uid);            // open userfile
            $a = io_user_query($userfile, $usermask);  // get info
            io_user_close($userfile);                  // close userfile

            // check all IP's
            for ($i=1; $i <= $a[0]; $i++)
            {
                // extract ip from "ident@ip" format
                if (strpos($a[$i], "@") > 0) { $userip = substr($a[$i], strpos($a[$i],"@")+1, strlen($a[$i])); }
                                        else { $userip = $a[$i]; }
                if ($userip == $ip)
                {
                    $resultid = $uid;
                    break;
                }
            }
            
            // get next userid from list
            $uid = io_user_list_fetch($userlist);
        }
        
        io_user_mask_close($usermask); // close usermask
        io_user_list_close($userlist); // close userlist
        
        return $resultid;
    }
ADDiCT is offline   Reply With Quote
 

Tags
feed, ftp, releases, rss, script


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
project-zs for ioFTPD caladan Caladan's scripts 278 08-02-2005 09:36 AM


All times are GMT -5. The time now is 11:20 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)