2013-09-27 01:38:44 +02:00
|
|
|
<?php
|
|
|
|
|
2014-03-07 12:27:30 +01:00
|
|
|
header("Access-Control-Allow-Origin: *");
|
|
|
|
header("Content-type: application/json");
|
|
|
|
|
2013-09-30 17:34:27 +02:00
|
|
|
require 'credentials.php';
|
|
|
|
|
2014-03-07 12:27:41 +01:00
|
|
|
$database = "doodle3d_com_connect";
|
|
|
|
$dsn = "mysql:host=doodle1.sql.greenhost.nl;dbname=$database";
|
2013-09-27 01:38:44 +02:00
|
|
|
$table = "signins";
|
|
|
|
|
2013-09-27 12:31:55 +02:00
|
|
|
try {
|
|
|
|
$db = new PDO($dsn, $username, $password);
|
|
|
|
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
$response = array( "status" => "error",
|
|
|
|
"msg" => $e->getMessage()." (".$e->getCode().")");
|
2013-09-27 18:47:03 +02:00
|
|
|
exit(json_encode($response)."\r\n");
|
2013-09-27 12:31:55 +02:00
|
|
|
}
|
2013-09-27 01:38:44 +02:00
|
|
|
?>
|