PHP gets swipe data, what to do with it

Source: Internet
Author: User
PHP gets swipe data
Made a PHP page with a user name that needs to be entered manually.
Now there is a USB interface card reader, want to swipe after the input in PHP can directly get the user name, avoid manual input cumbersome.
How do I do that? I have no clue now.
------to solve the idea----------------------
Write the information into a db or file after you swipe the card, which requires the card drive to connect with the computer.
Then PHP will read the file/db.
------to solve the idea----------------------
In the current page to set the corresponding input to focus, that is, to get focused, when you swipe on the card reader, the reader can directly put the card number read into the Inpu. You write a JavaScript script on the current page to retrieve the contents of this input continuously, and if there is content, stop detecting input and call an AJAX to make a request to the PHP program on the server side. I've done this before, and I can make it.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.