Go Back   FlashFXP Forums > > > >

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

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-24-2005, 08:03 PM   #1
wooolF[RM]
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 411
Lightbulb Latest releases // RSS feed

Well, this is kinda different from what people used to see.

Basically what is needed is RSS feed with latest/latest 5/latest 10 releases that came to FTP.

I know, you can always see it on IRC (if u run a sitebot). But what if u don't? Or you're not at home? This script requires some pretty hardcore skills and understanding in ioFTPD/XML/RSS and it should be a really challenge to any coder IMHO.

I'm not really asking to make such a script (tho' would really like to have one, no doubt). It's more like a question if that is possible at all, how to archieve it etc.


Any suggestions/comments are welcome.

Best regards, wooolF[RM]
wooolF[RM] is offline   Reply With Quote
Old 01-25-2005, 01:01 AM   #2
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

What about a script run by the scheduler every 5-10 minutes. It would parse ioFTPD.log, get the last 10 newly created dirs and then create the xml file according to the rss format.
It should of course be able to exclude some newdirs based on section or regexps that appear in the complete path (cd.*, etc.).
Finally, it might even send the feed to another server using ftp.exe or ncftpput.exe.

Another way would be a php script on your website that would parse ioFTPD.log itself to generate the xml page.
Harm is offline   Reply With Quote
Old 01-25-2005, 06:28 AM   #3
LoCaliSe
Member
 
Join Date: Aug 2003
Posts: 48
Default

Good Idea
LoCaliSe is offline   Reply With Quote
Old 01-26-2005, 12:07 PM   #4
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

Having some way to limit access would be good.

For example, by having an access URL like:
http://123.34.23.244/rss.php?u=username
the php script would validate that the request come from an IP allowed for the account 'username' and print the rss xml if it's ok, and nothing if not.
I don't know if io httpd & php extension has a variable for the request IP..? I think that would be the only blocker to such a script.
Mouton is offline   Reply With Quote
Old 01-26-2005, 12:39 PM   #5
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
Old 01-26-2005, 02:00 PM   #6
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

Anyone got a suggestion of a RSS feed reader with which I could test my script ?
ATM, I can allow or deny access using the IP or hostname depending on the specified account access masks, and I show all newdirs in rss items.
I'll probably parse the ioFTPD.log in 'real-time' (ie parse everything that appeared since last time it was parsed).
Mouton is offline   Reply With Quote
Old 01-26-2005, 06:03 PM   #7
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

Done.
The only problem (and it's not working until we can find a way to fix this) it that io's httpd doesn't want to send xml...

Code:
<?php
header('Content-Type: text/xml'); 

echo "<?xml version='1.0' ?>\n\n";
echo "<text/>";
?>
This shows as text/xml when loaded in Apache2, but it's text/plain when loaded by io's httpd...
This seems to cause problems with rss readers, making them choke on the otherwise valid rss xml...
Mouton is offline   Reply With Quote
Old 01-27-2005, 11:14 AM   #8
wooolF[RM]
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 411
Default

Quote:
Originally posted by Mouton
Anyone got a suggestion of a RSS feed reader with which I could test my script ?
FeedDemon / FeedReader
wooolF[RM] is offline   Reply With Quote
Old 01-27-2005, 11:16 AM   #9
wooolF[RM]
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 411
Default

Seems badass made something usefull:

http://badaas.ownage.ws/badRSS_1_0-io.zip

Any comments?
wooolF[RM] is offline   Reply With Quote
Old 01-27-2005, 11:27 AM   #10
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

Looks awfully complicated for something that simple... but as long as it work for you, then I guess that's fine.

I'm about to post mine, even if some rss reader might choke on it.
RSSOwl (POTM on SourceForge.net) handles it just fine. Firefox Live Bookmark also works fine.

*edit: http://www.ioftpd.com/scripts/script.php?id=168
Mouton is offline   Reply With Quote
Old 01-27-2005, 11:40 AM   #11
wooolF[RM]
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 411
Default

I haven't tested it yet... No mood... Still shocked after yesterday:
http://dd0s.org/~wooolf/carcrash/
wooolF[RM] is offline   Reply With Quote
Old 01-27-2005, 02:12 PM   #12
SnypeTEST
Senior Member
ioFTPD Scripter
 
Join Date: Feb 2003
Posts: 458
Default

pwned. atleast ur still alive...
SnypeTEST is offline   Reply With Quote
Old 08-31-2005, 11:05 AM   #13
rootbox
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2005
Posts: 1
Default

any updates?

Mouton´s version won´t work
rootbox is offline   Reply With Quote
Old 09-04-2005, 01:57 PM   #14
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

It works just fine here.
Mouton is offline   Reply With Quote
Reply

Tags
feed, ftp, releases, rss, script

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 03:03 AM.

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