<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>运达&#039;s  blog &#187; 身份证号检测</title>
	<atom:link href="https://www.yunda51.com/?feed=rss2&#038;tag=%E8%BA%AB%E4%BB%BD%E8%AF%81%E5%8F%B7%E6%A3%80%E6%B5%8B" rel="self" type="application/rss+xml" />
	<link>https://www.yunda51.com</link>
	<description>运达的博客</description>
	<lastBuildDate>Wed, 12 Nov 2025 07:58:26 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0.19</generator>
	<item>
		<title>检测身份证号与姓名是否匹配（阿里云API接口）</title>
		<link>https://www.yunda51.com/?p=1968</link>
		<comments>https://www.yunda51.com/?p=1968#comments</comments>
		<pubDate>Sun, 26 Nov 2023 14:57:42 +0000</pubDate>
		<dc:creator><![CDATA[运达]]></dc:creator>
				<category><![CDATA[php技术]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[身份证号检测]]></category>
		<category><![CDATA[阿里云Api]]></category>

		<guid isPermaLink="false">http://www.yunda51.com/?p=1968</guid>
		<description><![CDATA[直接上代码： /** * 检测身份证号与姓名是否匹配（阿里云API接口） * @return void * @<a href="https://www.yunda51.com/?p=1968" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>直接上代码：</p>
<pre class="wp-code-highlight prettyprint">
/**
 * 检测身份证号与姓名是否匹配（阿里云API接口）
 * @return void
 * @throws \think\db\exception\DataNotFoundException
 * @throws \think\db\exception\DbException
 * @throws \think\db\exception\ModelNotFoundException
 */
public function is_card(){
     $data = $this-&gt;request-&gt;post();
     $host = &quot;https://lfeid.market.alicloudapi.com&quot;;
	 $path = &quot;/idcheck/lifePost&quot;;
	 $method = &quot;POST&quot;;
	 $appcode = &quot;d923462151414d73a4a16f6a7730bb68&quot;;
	 $headers = array();
	 array_push($headers, &quot;Authorization:APPCODE &quot; . $appcode);
	 //根据API的要求，定义相对应的Content-Type
	 array_push($headers, &quot;Content-Type&quot;.&quot;:&quot;.&quot;application/x-www-form-urlencoded; charset=UTF-8&quot;);
	 $querys = &quot;&quot;;
	 $bodys = &quot;cardNo=&#039;&quot;.$data[&#039;cardNo&#039;].&quot;&#039;&amp;realName=&#039;&quot;.$data[&#039;realName&#039;].&quot;&#039;&quot;;
	 $bodys = str_replace(&quot;&#039;&quot;, &#039;&#039;, $bodys);
	// $bodys = &quot;cardNo=130432199206170113&amp;realName=刘运达&quot;;
	 $url = $host . $path;
	 $curl = curl_init();
	 curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
	 curl_setopt($curl, CURLOPT_URL, $url);
	 curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
	 curl_setopt($curl, CURLOPT_FAILONERROR, false);
	 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
	 curl_setopt($curl, CURLOPT_HEADER, true);
	 if (1 == strpos(&quot;$&quot;.$host, &quot;https://&quot;))
	 {
	     curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
	     curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
	 }
	 curl_setopt($curl, CURLOPT_POSTFIELDS, $bodys);
	 var_dump(curl_exec($curl));
}
</pre>
]]></content:encoded>
			<wfw:commentRss>https://www.yunda51.com/?feed=rss2&#038;p=1968</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
