For people who like to read fanfiction on their iPhones and prefer to do so using Stanza instead of Safari...
FLAG iPhone Companion is a collection of PHP scripts that creates XML feeds compatible with Stanza iPhone/iPod Touch for the FanFiction.Net website. The story retrieval system uses
FLAG by erayd. The format of the catalog was heavily patterned on the output of
Calibre's Stanza server. The ePUB conversion module (FLAG component) also makes use of the html2epub command-line utility in Calibre (0.5 & earlier).
Download and installation:
There are two files available for download. Please refer to the included readme.txt for further instructions.
ffnet.zip (104KB, md5: dd32671fc93349992f8b2cc8c05098a1) - For those who already have Apache and PHP set-up, this is a zip file containing just the PHP scripts themselves.
- Extract the contents of the zip file to an empty folder inside your document root. (e.g. C:\xampp\htdocs\ffnet)
- If you didn't extract it to ffnet, edit the settings.ini file and change dir to the folder (relative to document root) where you extracted the files.
- Edit catalog.xml to add your favorite categories.
xampplite-fic.exe (19.7MB, md5: 68bb12b6c98f8c9d16908a587883d882) - A ready-made Apache+PHP environment with the FiC scripts included. The php.ini has already been modified to load cURL and Tidy, and the pcre.backtrack.limit has been increased for compatibility with very long chapters. Apache configuration was also modified to enable mod_deflate. Uses XAMPPLite and can be installed on a flash drive.

- Extract the archive to the root directory (e.g. C:\, D:\, E:\, etc). Doesn't matter which drive letter, but it has to be in the root directory.
- Open \xampplite\xampp-control.exe, and click on the "Start" button for Apache. If you get a message from your firewall, select "Unblock".
- Edit catalog.xml (\xampplite\htdocs\ffnet\catalog.xml) to add your favorite categories. You can find the readme.txt in \xampplite\htdocs\ffnet\ for additional information.
Adding the catalog to Stanza:
- Go to Online Catalog
- Click on the plus (+) sign on the bottom right portion of the screen
- Select "Add Stanza Catalog"
- Type the Name and select the icon you want to assign
- For the URL, use http://your_ip_address/dir/ where your_ip_address is your computer's IP address (to get IP address on XP, click Start >> click Run >> type cmd.exe >> type ipconfig) and dir is the name of the folder where the FiC scripts are located (default for xampplite-fic.exe is ffnet). This only works if you're connected to your local network via wifi, though. For access over the internet, you're going to need to do some research on port forwarding. Getting a DynDNS or similar account would also be useful.
Notes:
- Calibre 0.5.14 or earlier must be installed for the script to work. You can download earlier versions here. Remember to restart your computer after installing Calibre so the environment path is updated.
- The Apache and PHP settings used are very lax since XAMPP was meant for development. If you plan on making the server available over the internet, I suggest you read up on Apache and PHP hardening. This seems to be a fairly good resource. You can't enable safe mode, though, since that would break scripts that require Calibre. Again, I'm not responsible if something bad happens.
- I highly suggest running this under a virtual machine. Not only is that potentially less harmful to your computer, it's also pretty much a requirement if you've already moved to Calibre 0.6.
Please post questions, suggestions and bug reports on this thread. Fair warning, I'm just a PHP beginner. Please be gentle.