Skip to content

Instantly share code, notes, and snippets.

View danyork's full-sized avatar

Dan York danyork

View GitHub Profile
<?php
/*
* A script demonstrating how to store user inut in an external database.
*/
// A function to store a document in CouchDB using cURL.
function saveData($callerID, $channel, $network, $text) {
$doc = json_encode(array("callerID" => $callerID, "channel" => $channel, "network" => $network, "text" => $text));
$url = COUCH_DB_HOST.":".COUCH_DB_PORT."/".COUCH_DB_NAME;