Jump to content

Simple question on advanced subject--PHP to hardware interaction


Recommended Posts

Just wanted to give a quick run down of why I'm asking the question.  I was talking to a possible website client and he asked about having a website where he could enter his sales for customers.  I have the ability to complete that, but I wasn't sure about getting PHP to interact with the register printer.  The register is a regular computer and the printer is a receipt printer such as those in a retail store.  So this brings me to my question.  Is it possible for PHP to directly interact with the printer when a sale is rung in?  Or would I have to use a different language to do so?  If I need a different language, which would get the job done?

well, how about thinking about it from a different angle...what if everytime a sale was rungup, you called a php script to do something... ?

 

I dont have an answer to  your question, but have a look at your exec() function, and maybe http://www.php.net/features.commandline ...

 

Cheers!

well, how about thinking about it from a different angle...what if everytime a sale was rungup, you called a php script to do something... ?

 

I dont have an answer to  your question, but have a look at your exec() function, and maybe http://www.php.net/features.commandline ...

 

Cheers!

 

Thanks for the alternative view!  I didn't think about it that way.  Alas...I'm still searching for a solution, haha.

wouldn't it be better to have the register act as the interface between your script and the printer? As in, have the script send what needs to be printed back to the register, and have the register print it, as it already sounds like it's setup and configured to do that.

wouldn't it be better to have the register act as the interface between your script and the printer? As in, have the script send what needs to be printed back to the register, and have the register print it, as it already sounds like it's setup and configured to do that.

 

I understand what you mean...I think.  I guess I didn't give enough background.  My idea was to basically create an entire online suite via PHP/HTML/etc. that he could access from anywhere to generate sales/client data and the like.  Currently he has a program on the computer that interacts with the printer, but he's only able to use it on that single computer.  He's also looking for a less expensive solution because he paid some $5000 for the program and it's hardly versatile.

How about producing a pdf in browser that he could print?

 

If that's not possible then I suspect that you're looking at exec().

 

I've built a similar system myself in the recent past though and we decided to do the till part in C# and the backend in php for exactly this reason. Is not much fun to print in php.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.