2015-06-28 20:58:51 +00:00
|
|
|
<?php
|
|
|
|
try {
|
2015-07-02 07:08:13 +00:00
|
|
|
require_once("usertable.php");
|
2015-06-28 20:58:51 +00:00
|
|
|
$user = $db->real_escape_string($_REQUEST['user']);
|
|
|
|
$q = $db->query("select pubkey from user where name='$user';");
|
|
|
|
if ($q->num_rows==1) {
|
|
|
|
echo json_encode($q->fetch_row()[0]);
|
|
|
|
} else {
|
|
|
|
echo json_encode(null);
|
|
|
|
}
|
|
|
|
} catch (Exception $e) {
|
|
|
|
echo json_encode(null);
|
|
|
|
}
|
|
|
|
?>
|