This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; |