Skip to content

Instantly share code, notes, and snippets.

@Streek
Created April 18, 2012 08:08
Show Gist options
  • Save Streek/2411926 to your computer and use it in GitHub Desktop.
Save Streek/2411926 to your computer and use it in GitHub Desktop.
Extract Database Information Via PHP on Heroku
<?php
//$_ENV['SHARED_DATABASE_URL'] should be changed to your environment variable.
extract(parse_url($_ENV['SHARED_DATABASE_URL']));
R::setup("pgsql:host=$host dbname=".substr($path,1), $user, $pass);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment