Query for sending and print setting.
Request URL: http://www.expedy.fr/api/print
Parameter |
Description |
Format |
printer |
UID printer visible in your console ( https://www.expedy.fr/console ) |
|
msg |
Content of the message to print |
|
PHP example:
Call the service in a file named: printer_point_lib.php
<?php
function Print_point($imprimante,$message) {
// id customer EXPEDY
$sid = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$data = array('sid' => $sid,'token' => $token,'params' => array('printer_uid' => $imprimante,'printer_msg' => $message));
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.expedy.fr/api/print");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$result = curl_exec ($ch);
curl_close ($ch);
return $result;
}
?>
Example sending message to print:
<?php
// Preparation
include "printer_point_lib.php";
$imprimante = "XXXXXXXXX";
// Your message
$msg = "Hello World !";
// To Print
Print_point($imprimante,$msg);
?>
Comments
0 comments
Article is closed for comments.