Home Forums TrueRNG Hardware random number generator How to read data from PHP?

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Ubld.it Staff 2 weeks, 3 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2246

    vygandas77
    Member

    I have successfully installed PHP, DIO library and dio_open() works, the serial port is opened. But what’s next?
    I see stuff in Python script which I don’t understand. Can comeone please give an example how to read data from PHP?

    Using TrueRNG Pro, Windows, WAMP server

    • This topic was modified 3 weeks, 5 days ago by  vygandas77.
    #2249

    Ubld.it Staff
    Moderator

    Just a quick google. If you look at this link:

    https://www.php.net/manual/en/function.dio-tcsetattr.php

    You will see the open it, set the port attributes, then read bytes from it. It’s the same as every language dealing with a serial port.
    Just make sure you are reading binary data.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.