Permalink
Browse files

Add documentation, add non-public credentials store.

  • Loading branch information...
1 parent 06f8966 commit 7227fe8e22dd8281d5ebe32b63a98851d13dd2f7 @meitar committed Aug 11, 2012
Showing with 38 additions and 0 deletions.
  1. +21 −0 README.markdown
  2. +11 −0 fetlife-accounts.php
  3. +6 −0 proxy.php
View
@@ -0,0 +1,21 @@
+# FetLife Proxy - README
+
+This is a super simple, super quick and dirty [reverse proxy](https://en.wikipedia.org/wiki/Reverse_proxy) designed to retrieve pages from [FetLife.com](https://FetLife.com/). It makes use of `[libFetLife](https://github.com/meitar/libFetLife)` for most of the heavy lifting.
+
+# Installation
+
+If you have a web server, you can download and install this server on your own site. To do so, you'll need:
+
+* [PHP](http://php.net/downloads.php) version 5.2 or greater.
+
+To install the proxy, do the following:
+
+1. [Download a ZIP archive of the proxy script](https://github.com/meitar/fetlife-proxy/zipball/master) and [the `libFetLife` library](https://github.com/meitar/libFetLife/zipball/master), both.
+2. Upload or place the proxy script on your server, and put `libFetLife`'s `FetLife.php` file in the `lib` folder of the proxy.
+3. Point your web browser at the location of the `proxy.php` file.
+
+That's it.
+
+# Sources of FetLife.com access credentials.
+
+By default, the proxy makes use of [publicly-available FetLife.com access credentials at BugMeNot.com](http://www.bugmenot.com/view/fetlife.com). If you'd like to add your own set of access credentials, edit the supplied `fetlife-accounts.php` file.
View
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Supplemental accounts to use for the proxy if BugMeNot.com can't be reached
+ * or if no accounts there are valid.
+ */
+
+// Add more accounts in array format, comma-separated, as shown:
+$my_FetLife_accounts = array(
+ // array('username1', 'password1'),
+ // array('username2', 'password2')
+);
View
@@ -29,6 +29,12 @@
}
// BugMeNot.com already sorts accounts based on reported success rate. Just use those.
+// Augment list of accounts with any additional credentials in `fetlife-accounts.php`.
+include_once('fetlife-accounts.php');
+if (!empty($my_FetLife_accounts)) {
+ $accts = array_merge($my_FetLife_accounts, $accts);
+}
+
// Find a working login and use it.
for ($i = 0; $i < count($accts); $i++) {
$FL = new FetLifeUser($accts[$i]['nickname'], $accts[$i]['password']);

0 comments on commit 7227fe8

Please sign in to comment.