百度API—身份证查询
2015-10-26 14:53
363 查看
直接上代码:
解析获取的json字符串见下篇文章。
#include <afxinet.h> void CTestJsonDlg::OnBnClickedButton1() { //使用百度api获取数据----------------------------------------------------------------- char buf[1000] = { 0 }; CString strIDCard; CInternetSession session; CHttpFile* file = NULL; int nRead; file = (CHttpFile *)session.OpenURL(_T("http://apistore.baidu.com/microservice/icardinfo?id=xxxxxxxxxxxxxxxxxx"));//id为身份证号码,需要自己输入 if (NULL != file){ //Do something here with the web request //Clean up the file here to avoid a memory leak!!!!!!! while ((nRead = file->Read(buf, sizeof(buf))) > 0){ strIDCard = buf; } GetDlgItem(IDC_ID_CARD)->SetWindowText(strIDCard ); file->Close(); delete file; } session.Close(); }
解析获取的json字符串见下篇文章。
相关文章推荐
- 百度地图出现网格,不显示地图
- Baidu云盘【文件API】接口学习 『一』
- 百度API 定位 返回当前详细位置
- 百度API获取位置范围内的周边服务
- 百度推广搜索API异步数据报告的下载与保存,另附乱码问题解决方案
- 短URL代码也可利用百度API生成
- 通过百度API获取公交数据导入ArcSDE
- H5获取定位信息
- 树莓派使用百度网盘实现上传下载
- 关于百度APIStore提供的接口调用失败问题
- 【微信开发】-HTML5页面直接调用百度地图API,获取当前位置,直接导航目的地
- 百度api商圈范围图修改获取坐标数据、点是否在区域范围判断、js解析创建excel
- python中的__init__函数重载与覆盖问题
- 百度开发者API接口:获取经纬度和详细地理位置(Geocoding API和IP定位API)
- 调用百度api文字识别,并将结果存入txt
- 用百度高精度IP定位服务返回当前地理位置
- 根据坐标在地图上添加点、标注及热力图(百度地图API)
- 利用百度API获取地名经纬度
- python爬虫之百度API调用方法
- 如何用php根据地址获取经纬度