2011-09-29 16:09:59 +00:00
|
|
|
<?php
|
|
|
|
require_once 'jsonRPCServer.php';
|
|
|
|
require_once 'smsSender.php';
|
|
|
|
require_once 'postgresGatewayBackend.php';
|
|
|
|
|
|
|
|
session_start();
|
|
|
|
|
2011-09-29 16:47:53 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
$backend = new postgresGatewayBackend('localhost', 'sms_gateway', 'quaiy8Zu', 'sms_gateway');
|
|
|
|
}
|
|
|
|
catch (PDOException $e)
|
|
|
|
{
|
|
|
|
header('Status: 500 Internal Server Error');
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
$smsSender = new smsSender(session_id(), $backend);
|
|
|
|
}
|
|
|
|
catch (Exception $e)
|
|
|
|
{
|
|
|
|
header('Status: 500 Internal Server Error');
|
|
|
|
}
|
|
|
|
|
|
|
|
jsonRPCServer::handle($smsSender);
|