Creating and uploading to a room
Note: This acticle assumes you’ve registered for an API Key and are using a VyewAPI Wrapper Class to help you construct calls to the server.
require_once("VyewAPI.php");
$vyew = new VyewAPI($YOUR_API_KEY, $YOUR_API_SECRET);
//Returns an array
$result=$vyew->create('new_room_name');
list($statusCode, $statusMsg, $roomID, $roomURL)=$result;
if ($statusCode==1) {
$result=$vyew->import($roomID, 'post:test.doc');
if ($result[0]!=1) echo "FAIL: Importing file.\n";
else echo "Import OK.\n";
}