示例#1
0
<?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)
示例#2
0
<?php

include 'Valite.php';
$name = time() . ".jpg";
$img = GrabImage("http://rkk.cdpf.org.cn/rand.jsp?tSessionId=1426303878194", $name);
if ($img) {
    echo '<img src="' . $name . '">';
} else {
    echo "false";
}
$valite = new Valite();
$valite->setImage($name);
$valite->getHec();
$ert = $valite->run();
//$ert = "1234";
// print_r($ert);
echo '</br>';
print_r($ert);
echo '</br>';
// echo '<br><img src="$name"><br>';
// echo '</br> count';
// var_dump($valite->getResult());
// echo $valite->getResult();
// count($valite->getResult());
// echo count($valite->getResult());
foreach ($valite->getResult() as $key => $value) {
    $line = '';
    foreach ($value as $key2 => $value2) {
        $line .= $value2;
    }
    echo $line . '</br>';
示例#3
0
<?php

include 'Valite.php';
$valite = new Valite();
$valite->setImage('4.jpeg');
$valite->getHec();
$ert = $valite->run();
//$ert = "1234";
print_r($ert);
echo '<br><img src="../phpcrash/4.jpeg"><br>';
示例#4
0
function increaseZimu($path,$zimu)
	{
		$valid = new Valite();
		$valid->setImage($path);
		$valid->setZimu($zimu);	
		$seg=$valid->segData();
		$value=$valid->getResult();
		
		$new=array();
		
		for($i = 0;$i<count($seg);$i++)
		{
			$new[$seg[$i]] = substr($value, $i,1);
		}
		$zimu=array_merge($zimu,$new);
//		var_dump($new);
		
		return $new;		
	}
示例#5
0
<?php
include 'vaild.php';

$valid = new Valite();
$valid->setImage('8.jpg');
$valid->seiZimu($zimu);

echo $valid->getResult();