Skip to content

Instantly share code, notes, and snippets.

@carlessistare
Created June 11, 2013 14:38
Show Gist options
  • Select an option

  • Save carlessistare/5757353 to your computer and use it in GitHub Desktop.

Select an option

Save carlessistare/5757353 to your computer and use it in GitHub Desktop.
Initialise Cassandra instance with PHP
require_once 'Cassandra.php';
$servers = array(
array(
'host' => '192.168.1.74',
'port' => 9160,
'use-framed-transport' => true,
'send-timeout-ms' => 1000,
'receive-timeout-ms' => 1000
)
);
$cassandra = Cassandra::createInstance($servers);
$cassandra->useKeyspace('DEMO');
$cassandra->set(
'ProcessLog.test',
array(
microtime() => $app
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment