if ($message != null)
{$qry = "INSERT INTO names1 (name, time, date)
VALUES ('$message', CURRENT_TIME, CURRENT_DATE);";
$insert = mysqli_query ($db, $qry);
$id = mysqli_insert_id($db);
$printer_id = '6g2o1s6t0f4e7v4a';
$print_url = 'http://printer.exciting.io/print/' . $printer_id;
$fields = array(
'content' => ( '<h1>' . $message . '</h1>')
);
function http_post_lite($url, $data) {
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
return $result = file_get_contents($url, false, $context);
}
$response = http_post_lite($print_url, $fields);
}
--
You received this message because you are subscribed to the Google Groups "Printer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gfr-printer...@googlegroups.com.
To post to this group, send email to gfr-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/gfr-printer.
For more options, visit https://groups.google.com/d/optout.