<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Using cURL in PHP to access HTTPS (SSL/TLS) protected sites</title>
	<atom:link href="http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/feed/" rel="self" type="application/rss+xml" />
	<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/</link>
	<description>the home of peter chng</description>
	<lastBuildDate>Mon, 15 Mar 2010 02:16:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Moses</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-1/#comment-190458</link>
		<dc:creator>Moses</dc:creator>
		<pubDate>Mon, 08 Mar 2010 17:54:18 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-190458</guid>
		<description>Dear Peter,

I discover that my yahoomail could not open the message page, instead of taking me to my page after loging it will display done without diplay the page. what can i do? meanwhile other website were open correctly.

Thanks

Reagards 

Moses</description>
		<content:encoded><![CDATA[<p>Dear Peter,</p>
<p>I discover that my yahoomail could not open the message page, instead of taking me to my page after loging it will display done without diplay the page. what can i do? meanwhile other website were open correctly.</p>
<p>Thanks</p>
<p>Reagards </p>
<p>Moses</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morten Juel</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-1/#comment-186699</link>
		<dc:creator>Morten Juel</dc:creator>
		<pubDate>Sun, 17 Jan 2010 12:31:50 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-186699</guid>
		<description>Thanks for this post, works like a charm :) Saved me hours. :)</description>
		<content:encoded><![CDATA[<p>Thanks for this post, works like a charm <img src='http://unitstep.net/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Saved me hours. <img src='http://unitstep.net/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Chng</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-1/#comment-186076</link>
		<dc:creator>Peter Chng</dc:creator>
		<pubDate>Sat, 02 Jan 2010 16:38:27 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-186076</guid>
		<description>@RD
As Tom indicated, you will have to re-download the certificate if it&#039;s re-issued.  Even if the public/private key used in the certificate stays the same, the other details (serial number, issue/expiry dates) will all be different, so in effect it&#039;s a completely different certificate.</description>
		<content:encoded><![CDATA[<p>@RD<br />
As Tom indicated, you will have to re-download the certificate if it&#8217;s re-issued.  Even if the public/private key used in the certificate stays the same, the other details (serial number, issue/expiry dates) will all be different, so in effect it&#8217;s a completely different certificate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RD</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-1/#comment-186016</link>
		<dc:creator>RD</dc:creator>
		<pubDate>Sat, 02 Jan 2010 09:54:43 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-186016</guid>
		<description>Thanks Tom! Much appreciated. Have an excellent 2010.</description>
		<content:encoded><![CDATA[<p>Thanks Tom! Much appreciated. Have an excellent 2010.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-1/#comment-185393</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Tue, 29 Dec 2009 23:26:59 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-185393</guid>
		<description>@RD

I haven&#039;t encountered this situation yet, but I&#039;ve got the expiration dates marked in my calendar...

Since the cert. will expire and the site will get a new one, then I&#039;d expect the key it contains to be different - and hence your local copy will need updating if you&#039;re using it to verify against with cURL / PHP.</description>
		<content:encoded><![CDATA[<p>@RD</p>
<p>I haven&#8217;t encountered this situation yet, but I&#8217;ve got the expiration dates marked in my calendar&#8230;</p>
<p>Since the cert. will expire and the site will get a new one, then I&#8217;d expect the key it contains to be different &#8211; and hence your local copy will need updating if you&#8217;re using it to verify against with cURL / <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RD</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-1/#comment-185369</link>
		<dc:creator>RD</dc:creator>
		<pubDate>Tue, 29 Dec 2009 20:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-185369</guid>
		<description>Great article! Thank you!

Just a quick question - when the certificate on the server expires and the CA has to re-issue the certificate, would you have to go through the process of downloading the PEM file (as shown in the illustration above)?

Thanks so much again!</description>
		<content:encoded><![CDATA[<p>Great article! Thank you!</p>
<p>Just a quick question &#8211; when the certificate on the server expires and the CA has to re-issue the certificate, would you have to go through the process of downloading the PEM file (as shown in the illustration above)?</p>
<p>Thanks so much again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J Marriott</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-1/#comment-184112</link>
		<dc:creator>J Marriott</dc:creator>
		<pubDate>Tue, 22 Dec 2009 16:44:14 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-184112</guid>
		<description>Thank you for this; worked perfectly and finally allowed me to stop banging my head on the desk!

Cheers,

James.</description>
		<content:encoded><![CDATA[<p>Thank you for this; worked perfectly and finally allowed me to stop banging my head on the desk!</p>
<p>Cheers,</p>
<p>James.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-1/#comment-183483</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 18 Dec 2009 16:45:05 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-183483</guid>
		<description>Thank you so much for this. It was a huge help in solving an issue I was having.</description>
		<content:encoded><![CDATA[<p>Thank you so much for this. It was a huge help in solving an issue I was having.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Titcumb &#187; Blog Archive &#187; cURL Tips &#8211; HTTPS requests</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-1/#comment-183040</link>
		<dc:creator>James Titcumb &#187; Blog Archive &#187; cURL Tips &#8211; HTTPS requests</dc:creator>
		<pubDate>Tue, 15 Dec 2009 20:55:35 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-183040</guid>
		<description>[...] by checking against the genuine CA certificate in PEM format. There are plenty of tutorials (e.g. here) on the internet to obtain the PEM certificate, so I won&#8217;t go into that here. All you need to [...]</description>
		<content:encoded><![CDATA[<p>[...] by checking against the genuine CA certificate in PEM format. There are plenty of tutorials (e.g. here) on the internet to obtain the PEM certificate, so I won&#8217;t go into that here. All you need to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OctaneFX</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-1/#comment-174983</link>
		<dc:creator>OctaneFX</dc:creator>
		<pubDate>Sun, 08 Nov 2009 04:17:47 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-174983</guid>
		<description>Thanks, works for me

but over proxy I can´t access any https hosts.

function getPage($proxy, $url, $referer, $agent, $header, $timeout) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, $header);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_PROXY, $proxy);
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 0);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    curl_setopt($ch, CURLOPT_REFERER, $referer);
    curl_setopt($ch, CURLOPT_USERAGENT, $agent);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

	curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); 
    $result[&#039;EXE&#039;] = curl_exec($ch);
    $result[&#039;INF&#039;] = curl_getinfo($ch);
    $result[&#039;ERR&#039;] = curl_error($ch);
 
    curl_close($ch);
 
    return $result;
}

$proxyip=&quot;66.178.105.245:8080&quot;;
$result = getPage($proxyip,&#039;https://twitter.com/signup?follow=octanefx&amp;commit=Join+today!&#039;,&#039;http://www.google.com/&#039;,&#039;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8&#039;,1,5);
print_r($result);</description>
		<content:encoded><![CDATA[<p>Thanks, works for me</p>
<p>but over proxy I can´t access any https hosts.</p>
<p>function getPage($proxy, $url, $referer, $agent, $header, $timeout) {<br />
    $ch = curl_init();<br />
    curl_setopt($ch, CURLOPT_URL, $url);<br />
    curl_setopt($ch, CURLOPT_HEADER, $header);<br />
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />
    curl_setopt($ch, CURLOPT_PROXY, $proxy);<br />
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 0);<br />
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);<br />
    curl_setopt($ch, CURLOPT_REFERER, $referer);<br />
    curl_setopt($ch, CURLOPT_USERAGENT, $agent);<br />
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);<br />
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);</p>
<p>	curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);<br />
    $result['EXE'] = curl_exec($ch);<br />
    $result['INF'] = curl_getinfo($ch);<br />
    $result['ERR'] = curl_error($ch);</p>
<p>    curl_close($ch);</p>
<p>    return $result;<br />
}</p>
<p>$proxyip=&#8221;66.178.105.245:8080&#8243;;<br />
$result = getPage($proxyip,&#8217;https://twitter.com/signup?follow=octanefx&amp;commit=Join+today!&#8217;,'http://www.google.com/&#8217;,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8&#8242;,1,5);<br />
print_r($result);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
