Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $label = "labelPath/label.xml";
- $userName = "";
- $password = 1234;
- $printer = "192.168.178.88";
- // Build connection
- $ftp_conn = ftp_connect($printer) or die("Could not connect to the printer");
- $login = ftp_login($ftp_conn, $userName, $password);
- // upload file and drive the printer to print label
- if (!(ftp_put($ftp_conn, "label.xml", $label, FTP_ASCII))) {
- echo "Error occurred when uploading $label.";
- }
- ftp_close($ftp_conn);
Add Comment
Please, Sign In to add comment