Arexx BS-1000LAN Mode D'emploi page 84

Table des Matières

Publicité

Les langues disponibles

Les langues disponibles

Explanation PHP example
In this case arguments are provided without argument names. This means
the BS1000 message should match the expected arguments exactly. The
message should be formed as follows:
abcdef&&$d&&$t&&$i&&$v
The argument list is decomposed into an array or strings ($args). The num-
ber of arguments should be equal to 5 in this case, and the first argument
serves as a password. The arguments are base64 decoded, and a simple
character replacement is done to prevent sql injection. This is shown here to
remind you precausions should be taken to prevent misuse of the database.
Also, but not shown here, some argument checking should be done like chec-
king date and time. Since the BS1000 will only send in actual data,
measurements with time stamps that deviate from the actual time can be
rejected. The last step is where data is stored into the database by the sql
insert statement.
84

Publicité

Table des Matières
loading

Table des Matières