Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003

    Unanswered: php to access serial port and place data in Mysql

    php to access serial port and place data in Mysql.

    How would I do this?

    I have a UNIX box that is running an industrial vision system and on the serial port it sends whatever ASCII characters it sees followed by <CR> and starts the process again on a valid read from the camera.

    What I want to do is to get that string <50char.and place it in a MySQL database on a windoze machine via the RS232 cable.
    In doing that I want there to have a unique_ID assigned to the database entry along with a TIMESTAMP for every read, so I imagined that the <CR> would trigger some kind of process that formed the insert statements.

    example strings 00000000<CR>

    example database fields

    01 | 00000000 | 01012003000000|
    02 | 00353776 | 01012003000011|
    03 | 43737453 | 01012003000034|

    I have been told many other ways to do it with Python and Vis Basic......but I wana use PHP......

    I sure hope somebody can help on this one. examples would be a great help.

  2. #2
    Join Date
    Dec 2002

    To Bad!

    You're looking at the wrong thing to do the job. PHP is ment for the internet and web sites, not for machines that run independently. If you dont know any other code besides PHP consiter using c to to the job, much of the syntax is the same. Best of Luck!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts