Smart cards,touch screens and PHP
Moderator: General Moderators
-
lazaroskyr
- Forum Newbie
- Posts: 11
- Joined: Wed Oct 18, 2006 5:21 am
Smart cards,touch screens and PHP
I am planning on creating a program that will use smart cards and touch screens.Is PHP suitable for this purpose?I mean can PHP work with smart cards and touch screens?The program will be web based so I must use PHP...
PHP can't access smart card technology directly, but it may be possible to access a card reader as a stream from a serial port or USB. Depends on the card reader mostly. You might need to write a small application to act as a go-between between PHP and the card.
When I was making software for kiosk systems many years ago we built a VB 'browser' that was essentially just an IE control in an application for viewing things from a server, but the VB app also had hooks to a smart card reader COM object that we added to used to add data to requests going to the server. It was pretty dodgy to be honest, had a number of problems.
When I was making software for kiosk systems many years ago we built a VB 'browser' that was essentially just an IE control in an application for viewing things from a server, but the VB app also had hooks to a smart card reader COM object that we added to used to add data to requests going to the server. It was pretty dodgy to be honest, had a number of problems.
-
lazaroskyr
- Forum Newbie
- Posts: 11
- Joined: Wed Oct 18, 2006 5:21 am
- MrPotatoes
- Forum Regular
- Posts: 617
- Joined: Wed May 24, 2006 6:42 am
-
lazaroskyr
- Forum Newbie
- Posts: 11
- Joined: Wed Oct 18, 2006 5:21 am
Maybe the best way to describe it is: "can the browser read from a smart card reader like it does with barcodes, touch screens etc"? I suppose that it is wrong to say "php can or cannot read from a smart card".So is there a solution to it or I must stop trying?
Let's say something else.Can I read the data with a java applet and then pass it to php?
Let's say something else.Can I read the data with a java applet and then pass it to php?
-
lazaroskyr
- Forum Newbie
- Posts: 11
- Joined: Wed Oct 18, 2006 5:21 am
The program is for hotels.The customer pays money in advance to the hotel, takes the smartcard,the money is put into the smart card(like an electronic wallet) and when he/she byes something from the hotel,the money is taken from the smart card.
The program is written in Visual Basic(is working right now) and we want to be web based from now on.So it will be a pure browser/web based program.
So the conclusion is that a browser cannot read from a smart card and I can(?) use java for that purpose?
I wonder if I pass the data that I want from java to a server page,then a server side scripting language can handle it in any way I want?
The program is written in Visual Basic(is working right now) and we want to be web based from now on.So it will be a pure browser/web based program.
So the conclusion is that a browser cannot read from a smart card and I can(?) use java for that purpose?
I wonder if I pass the data that I want from java to a server page,then a server side scripting language can handle it in any way I want?
What is the advantage of converting this system to a web/browser based application?lazaroskyr wrote:The program is for hotels.The customer pays money in advance to the hotel, takes the smartcard,the money is put into the smart card(like an electronic wallet) and when he/she byes something from the hotel,the money is taken from the smart card.
The program is written in Visual Basic(is working right now) and we want to be web based from now on.So it will be a pure browser/web based program.
A browser cannot read from a smart card on it's own.lazaroskyr wrote:So the conclusion is that a browser cannot read from a smart card and I can(?) use java for that purpose?
You could embed a Java application into the page, then the Java could read and write to the smart card, and pass data to the browser, which would in turn pass it to the server.lazaroskyr wrote:I wonder if I pass the data that I want from java to a server page,then a server side scripting language can handle it in any way I want?
I really don't see the advantage of using a browser interface at the client level though. You've got a working system at the moment. Why are you scrapping all that? I can see the advantage of having a web based interface for users to put more money onto their card (for example), but that wouldn't need any access to the card itself. Just update the client's balance in a database, and next time they put their card into a cardreader update it assuming the card holds a copy of the balance. On the system I worked on the card just held a unique ID, all the data was stored on a central server.
When you say smart card, do you mean with a chip or do you mean mag stripe?
Mag stripe would normally only hold a card ID and not the actual money so the money held against the card would be a field in the database. You can get 2 and 3 track readers that plug into the keyboard socket on a 'Wedge' and effectively inject a text string into the IO buffer like the keyboard or a barcode reader would.
If you are talking about a chip then you would need an application to interface with the card reader and PHP would probably not be the correct solution for that because you would need to open a stream on a com port (or send data to an IP address if the reader plugs into the network). I would suspect that any card reader would come with an interface application that you could access with DLLs or activeX components
Mag stripe would normally only hold a card ID and not the actual money so the money held against the card would be a field in the database. You can get 2 and 3 track readers that plug into the keyboard socket on a 'Wedge' and effectively inject a text string into the IO buffer like the keyboard or a barcode reader would.
If you are talking about a chip then you would need an application to interface with the card reader and PHP would probably not be the correct solution for that because you would need to open a stream on a com port (or send data to an IP address if the reader plugs into the network). I would suspect that any card reader would come with an interface application that you could access with DLLs or activeX components