Skip to content

Instantly share code, notes, and snippets.

View coderoshi's full-sized avatar

Eric Redmond coderoshi

View GitHub Profile
@coderoshi
coderoshi / mongohq.php
Created February 20, 2012 20:04 — forked from lhitchon/gist:1424751
MongoHQ PHP Connection
<!-- PHP Mongo Docs: http://php.net/manual/en/class.mongodb.php -->
<html>
<body>
<h1>MongoHQ Test</h1>
<?php
try {
// connect to MongoHQ assuming your MONGOHQ_URL environment
// variable contains the connection string
$connection_url = getenv("MONGOHQ_URL");