<?php include 'Valite.php'; set_time_limit(0); $cookie_file = microtime() . 'tmp.cookie'; $verifyCode_file = microtime() . 'verifyCode.jpg'; savecookie($cookie_file, $verifyCode_file); // saveCheckcode($cookie_file,$verifyCode_file); echo '</br>'; echo '<img src="' . $verifyCode_file . '">'; $valite = new Valite(); $valite->setImage($verifyCode_file); $valite->getHec(); $ert = $valite->run(); echo '</br>'; echo '验证码识别结果:</br>'; print_r($ert); echo '</br>'; // foreach ($valite->getResult() as $key => $value) { // $line=''; // foreach ($value as $key2 => $value2) { // $line.=$value2; // } // echo $line.'</br>'; // } $postData = "getAjax=true&type=211948D59141A611&name=%E5%A7%9C%E5%AE%81&cid=371082199206047139121&cardType=1&checkCode={$ert}&x=67&y=18"; echo $postData; echo '</br>'; getAuthResult($postData, $cookie_file); // unlink($verifyCode_file); // unlink($cookie_file); function savecookie($cookie_file, $verifyCode_file)