Skip to content

Instantly share code, notes, and snippets.

View mongolab-rest-api.php
<?php
// Get this at your MongoLab.com user page
$MONGOLAB_API_KEY = 'XXXXXXXXXXXXXX';
$DB = 'mydb';
$COLLECTION = 'mycollection';
$name = $_POST['fullName'];
$email = $_POST['email'];
$phone = $_POST['phoneNumber'];
$src = $_POST['src'];
View gist:489130
"""MongoDB UserStore implementation"""
try:
import cPickle as pickle
except ImportError:
import pickle
import pymongo
from pymongo import Connection
from pymongo.errors import ConnectionFailure