I'm not exactly sure, how I can connect to a database I have on heroku through my local server created by WebMatrix. I have code to connect to the database work if I run the php script when my application is hosted on heroku. The line below fails:
$dbconn = pg_connect("host=someEC2Instance.com port=5432 dbname=xxxxxxx user=xxxxxxxx password=xxxxxxxxxx sslmode=require options='--client_encoding=UTF8'") or die('Could not connect: ' . pg_last_error());
I want to work with the database hosted on heroku, does anybody know what's wrong here?