Here’s my rough attempt, though bear in mind I haven’t actually tested this…
In the code at the top, inside the `if` statement checking whether or not there was a message parameter, add something like the following:
// send the message to the printer server
$printer_id = '6g2o1s6t0f4e7v4a';
$print_url = '
http://printer.exciting.io/print/' . $printer_id;
$fields = array(
'content' => ('<h1>' . $message . '</h1>')
]
http_post_fields ($print_url, $fields);
This does basically everything that your Processing script does, except it doesn’t need to parse any XML because it already has the data. You can read more about the `http_post_fields` function here:
http://www.php.net/manual/en/function.http-post-fields.php
Hopefully this (or something very like it) will mean that messages get automatically sent to your printer immediately.
— James
> > > > > > > The main reason I'm posting is to ask about printing images. For the project, children manipulate an image from space sent to an observa> > > To unsubscribe from this group and stop receiving emails from it, send an email to
gfr-printer...@googlegroups.com (mailto:
gfr-printer...@googlegroups.com) (javascript:;) (javascript:) (mailto:
gfr-printer...@googlegroups.com (mailto:
gfr-printer%2Bunsu...@googlegroups.com) (javascript:;) (javascript:)).
> > > > > > > To post to this group, send email to
gfr-p...@googlegroups.com (mailto:
gfr-p...@googlegroups.com) (javascript:;) (javascript:) (mailto:
gfr-p...@googlegroups.com (javascript:;) (javascript:)).
> > > > > To unsubscribe from this group and stop receiving emails from it, send an email to
gfr-printer...@googlegroups.com (mailto:
gfr-printer%2Bunsu...@googlegroups.com) (javascript:;) (mailto:
gfr-printer...@googlegroups.com (mailto:
gfr-printer%2Bunsu...@googlegroups.com) (javascript:;)).
> > > > > To post to this group, send email to
gfr-p...@googlegroups.com (mailto:
gfr-p...@googlegroups.com) (javascript:;) (mailto:
gfr-p...@googlegroups.com (javascript:;)).
> > > > To unsubscribe from this group and all its topics, send an email to
gfr-printer...@googlegroups.com (mailto:
gfr-printer%2Bunsu...@googlegroups.com) (javascript:;).
> > > > To post to this group, send an email to
gfr-p...@googlegroups.com (mailto:
gfr-p...@googlegroups.com) (javascript:;).
> > > To unsubscribe from this group and stop receiving emails from it, send an email to
gfr-printer...@googlegroups.com (mailto:
gfr-printer%2Bunsu...@googlegroups.com) (mailto:
gfr-printer...@googlegroups.com (mailto:
gfr-printer%2Bunsu...@googlegroups.com)).
> > > To post to this group, send email to
gfr-p...@googlegroups.com (mailto:
gfr-p...@googlegroups.com) (mailto:
gfr-p...@googlegroups.com).
> > To unsubscribe from this group and all its topics, send an email to
gfr-printer...@googlegroups.com (mailto:
gfr-printer%2Bunsu...@googlegroups.com).
> > To post to this group, send an email to
gfr-p...@googlegroups.com (mailto:
gfr-p...@googlegroups.com).
> Attachments:
> - form2.php
>
> - messageresults.php
>