<?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>J.et wong&#039;s 懒人记事本 &#187; openssl  Apache curl post</title>
	<atom:link href="http://j.etwong.com/blog-tag/openssl-apache-curl-post/feed" rel="self" type="application/rss+xml" />
	<link>http://j.etwong.com</link>
	<description>看看想想记记</description>
	<lastBuildDate>Wed, 01 Feb 2012 11:59:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>PHP加载OPEN SSL功能</title>
		<link>http://j.etwong.com/blog-116</link>
		<comments>http://j.etwong.com/blog-116#comments</comments>
		<pubDate>Fri, 16 Oct 2009 02:28:36 +0000</pubDate>
		<dc:creator>J.et wong</dc:creator>
				<category><![CDATA[Symbian]]></category>
		<category><![CDATA[openssl  Apache curl post]]></category>

		<guid isPermaLink="false">http://j.etwong.com/?p=116</guid>
		<description><![CDATA[ＭＳ是个很麻烦的问题，不简单是从php.ini中去掉 ;extension=php_openssl.dll 和把dll复制到c:\windows\system32目录中 你会发现在PHPinfo里，还是看不到openssl的信息。 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-一条分隔线&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- 看这里的文档： http://www.php.net/manual/en/openssl.installation.php 大意是说： 在Apache加载PHP模式下，加载这两个dll是有顺序，先去Apache的bin下的dll加载，一看真是两个文件名一模一样，就是大小不一样， 换上新的文件，phpinfo又出现OpenSSL了 但是http  request 还是得不到他的信息，真郁闷，最后还是用Curl来解决这个问题 // 初始化一个 cURL 对象 $curl = curl_init(); // 设置你需要抓取的URL curl_setopt($curl, CURLOPT_URL, &#8216;https://XXXXX/xxx.xxx&#8217;); //ＳＳＬ验证 curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);  //如果需要验证的话，设成false // 设置header curl_setopt($curl, CURLOPT_HEADER, 1); //如果为１，会打印出来header的 // 设置cURL 参数，要求结果保存到字符串中还是输出到屏幕上。 curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 运行cURL，请求网页 $data = curl_exec($curl); // 关闭URL请求 curl_close($curl); // 显示获得的数据 [...]]]></description>
			<content:encoded><![CDATA[<p>ＭＳ是个很麻烦的问题，不简单是从php.ini中去掉</p>
<p>;extension=php_openssl.dll</p>
<p>和把dll复制到c:\windows\system32目录中</p>
<p>你会发现在PHPinfo里，还是看不到openssl的信息。</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-一条分隔线&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>看这里的文档：</p>
<p><a href="http://www.php.net/manual/en/openssl.installation.php">http://www.php.net/manual/en/openssl.installation.php</a></p>
<p>大意是说：</p>
<p>在Apache加载PHP模式下，加载这两个dll是有顺序，先去Apache的bin下的dll加载，一看真是两个文件名一模一样，就是大小不一样，</p>
<p>换上新的文件，phpinfo又出现OpenSSL了</p>
<p>但是http  request 还是得不到他的信息，真郁闷，最后还是用Curl来解决这个问题</p>
<p>// 初始化一个 cURL 对象<br />
$curl = curl_init();</p>
<p>// 设置你需要抓取的URL<br />
curl_setopt($curl, CURLOPT_URL, &#8216;https://XXXXX/xxx.xxx&#8217;);</p>
<p>//ＳＳＬ验证<br />
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1);<br />
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);  //如果需要验证的话，设成false<br />
// 设置header<br />
curl_setopt($curl, CURLOPT_HEADER, 1); //如果为１，会打印出来header的</p>
<p>// 设置cURL 参数，要求结果保存到字符串中还是输出到屏幕上。<br />
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);</p>
<p>// 运行cURL，请求网页<br />
$data = curl_exec($curl);</p>
<p>// 关闭URL请求<br />
curl_close($curl);</p>
<p>// 显示获得的数据<br />
var_dump($data);</p>
]]></content:encoded>
			<wfw:commentRss>http://j.etwong.com/blog-116/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

