本人用的是网上的Java版本,经过本人的改良只剩下验证码识别。
详细说明请看 http://www.unique-liu.com/181.html
ImagePreProcess.srcPath = ctrackcode_srcimg;
ImagePreProcess.trainPath = ctrackcode_trainimg;
String name = request.getParameter("c").toString(); //给图片加个缓存名称
String checkcodeUrl = request.getParameter("url").toString(); //此图片的地址
String checkCodeImg="a";
String secretcode = "";
try{
checkCodeImg = ImagePreProcess.downloadImage(checkcodeUrl+"?", name+".png");
}catch(Exception e){
}
if (checkCodeImg != "a" ||checkCodeImg != null ) {
secretcode = ImagePreProcess.getAllOcr(checkCodeImg);
File ml =new File(checkCodeImg);
ml.delete();
out.print(secretcode);}
测试地址:
http://www.kejibu.org:8080/WhxyJw/yzm.jsp?c=312fz&url=http://61.142.33.204/CheckCode.aspx