Example code sharing for PHP implementation of oath dynamic password algorithm
<? PHP/** * This program was free software:you can redistribute it and/or modify * it under the terms of the GNU general Public License as published by * The free software Foundation, either version 3 of the License, or * (in your option) an Y later version. * * This program was distributed in the hope that it'll be useful, * but without any WARRANTY; Without even the implied warranty of * merchantability or FITNESS for A particular PURPOSE. See the * GNU general public License for more details. * * You should has received a copy of the GNU general public License * along. If not, see
The above content is saved as oath.php, and the test runs in two ways:
1. Run command line: Php.exe oath.php
Path problem Everybody knows
2, deployed in the Web directory, through the Web Access
Example: http://localhost/oath.php