<?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>Sun, 05 Feb 2012 23:06:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jasmine</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-3/#comment-306143</link>
		<dc:creator>Jasmine</dc:creator>
		<pubDate>Mon, 16 Jan 2012 04:19:29 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-306143</guid>
		<description>Awesome. I was doing curl and couldn&#039;t get any response from the server. No errors or anything. Turns out to be https issue! You have saved my day!</description>
		<content:encoded><![CDATA[<p>Awesome. I was doing curl and couldn&#8217;t get any response from the server. No errors or anything. Turns out to be https issue! You have saved my day!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deep</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-2/#comment-298519</link>
		<dc:creator>Deep</dc:creator>
		<pubDate>Sat, 17 Dec 2011 10:01:07 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-298519</guid>
		<description>i want to scrap one java site.which is done java struts mvc.i want scrap details of 6 page using their parameters and want result of last page.i searched lot but not founf any solution.please if any one can logic or idea please give me solution guys.

thanks in advance guys.</description>
		<content:encoded><![CDATA[<p>i want to scrap one java site.which is done java struts mvc.i want scrap details of 6 page using their parameters and want result of last page.i searched lot but not founf any solution.please if any one can logic or idea please give me solution guys.</p>
<p>thanks in advance guys.</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-2/#comment-296940</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Mon, 12 Dec 2011 11:30:43 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-296940</guid>
		<description>@sergio

Shared hosting should be irrelevant (unless they&#039;ve limited PHP so you can&#039;t use what you need to).

If you&#039;ve only got a HTML option for saving, you&#039;re not following the instructions in the original article. Use Firefox and follow the instructions carefully; there will be a PEM option.

Regards,
Tom.</description>
		<content:encoded><![CDATA[<p>@sergio</p>
<p>Shared hosting should be irrelevant (unless they&#8217;ve limited <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym> so you can&#8217;t use what you need to).</p>
<p>If you&#8217;ve only got a <acronym class="uttInitialism" title="HyperText Markup Language">HTML</acronym> option for saving, you&#8217;re not following the instructions in the original article. Use Firefox and follow the instructions carefully; there will be a PEM option.</p>
<p>Regards,<br />
Tom.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sergio</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-2/#comment-296936</link>
		<dc:creator>sergio</dc:creator>
		<pubDate>Mon, 12 Dec 2011 11:24:35 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-296936</guid>
		<description>Does this article apply for shared hostings?

If I create the PEM file I&#039;ll be only able to save it in html/, not above that.

Doesn&#039;t that endangers the certificate?

Thanks.</description>
		<content:encoded><![CDATA[<p>Does this article apply for shared hostings?</p>
<p>If I create the PEM file I&#8217;ll be only able to save it in html/, not above that.</p>
<p>Doesn&#8217;t that endangers the certificate?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zenk</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-2/#comment-294334</link>
		<dc:creator>zenk</dc:creator>
		<pubDate>Sat, 03 Dec 2011 16:25:56 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-294334</guid>
		<description>very good, thanks</description>
		<content:encoded><![CDATA[<p>very good, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Palani</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-2/#comment-292448</link>
		<dc:creator>Palani</dc:creator>
		<pubDate>Thu, 24 Nov 2011 10:48:19 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-292448</guid>
		<description>Missing Snippet code:

$ch = curl_init();   
  
curl_setopt($ch, CURLOPT_URL, &quot;https://www.google.com/accounts/ClientLogin&quot;);   
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);   

$data = array(&#039;accountType&#039; =&gt; &#039;GOOGLE&#039;,  
&#039;Email&#039; =&gt; &#039;palani@xxxxxx.com&#039;,   
&#039;Passwd&#039; =&gt; &#039;xxxxxxxx&#039;,
&#039;service&#039;=&gt;&#039;jotspot&#039;,
&#039;source&#039;=&gt;&#039;&#039;,   
);</description>
		<content:encoded><![CDATA[<p>Missing Snippet code:</p>
<p>$ch = curl_init();   </p>
<p>curl_setopt($ch, CURLOPT_URL, &#8220;https://www.google.com/accounts/ClientLogin&#8221;);<br />
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);   </p>
<p>$data = array(&#8216;accountType&#8217; =&gt; &#8216;GOOGLE&#8217;,<br />
&#8216;Email&#8217; =&gt; &#8216;palani@xxxxxx.com&#8217;,<br />
&#8216;Passwd&#8217; =&gt; &#8216;xxxxxxxx&#8217;,<br />
&#8216;service&#8217;=&gt;&#8217;jotspot&#8217;,<br />
&#8216;source&#8217;=&gt;&#8221;,<br />
);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Palani</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-2/#comment-292444</link>
		<dc:creator>Palani</dc:creator>
		<pubDate>Thu, 24 Nov 2011 10:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-292444</guid>
		<description>Missing snippet code lines(from top):

 &#039;GOOGLE&#039;,</description>
		<content:encoded><![CDATA[<p>Missing snippet code lines(from top):</p>
<p> &#8216;GOOGLE&#8217;,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Palani</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-2/#comment-292439</link>
		<dc:creator>Palani</dc:creator>
		<pubDate>Thu, 24 Nov 2011 10:16:29 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-292439</guid>
		<description>How do i authenticate a Google site through PHP?

The following are the code snippet
 &#039;GOOGLE&#039;,  
&#039;Email&#039; =&gt; &#039;palani@xxxxxx.com&#039;,   
&#039;Passwd&#039; =&gt; &#039;xxxxxxxx&#039;,
&#039;service&#039;=&gt;&#039;jotspot&#039;,
&#039;source&#039;=&gt;&#039;&#039;,   
);   
  
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);   
curl_setopt($ch, CURLOPT_POST, true);   
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);   
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);   
  
$hasil = curl_exec($ch);   
echo $hasil;   

$authRaw = strstr($hasil, &quot;Auth&quot;);
$authToken = substr($authRaw, 5);

$headers = array(&quot;Authorization: GoogleLogin auth=$authToken&quot;);

//echo $headers;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);   
curl_setopt($ch, CURLOPT_HEADER, false);   

$ch = curl_init(&quot;https://sites.google.com/a/thecuriousminds.net/parents-corner/&quot;);
  
$hasil = curl_exec($ch);   
echo $hasil;
curl_close($ch);
?&gt;


Getting the Auth tockens:
Auth=DQAAAOEAAAAoFK1cwuepXgZyQhQG58ZeFsZ9RGtNkoFOJlsjAL3h5sc0-m5vwcjBNSTWooYd-JT2huuy_NeSUCrvA1_5_QjH6QsRWLkQfy6Cun81TVzDk4JAWyNz7lq7dM5gs2_0-ncHeq117bI2b09f2VVaolJnkrWO21KL_rw7c_IQZjpT_PoIL3_opUoLvJMvgz1xMWQB6Thpvv8TngPB1UiCw5E10JIEetl0l6mlzobmv77Zq1s3uAGu1tQ--J8NWANv5NPPANEqckSsIOtWoBVdZ2AZ5JOKYeeKAp9cDcwVivaY5w9lughsxVqdm4MekUL502I 

Basically i am trying to access this https://sites.google.com/a/thecuriousminds.net/parents-corner/ through PHP passing with the google&#039;s emailId and password.

Pleas help me to fix this, i am trying to fix this very looong time.

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>How do i authenticate a Google site through <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym>?</p>
<p>The following are the code snippet<br />
 &#8216;GOOGLE&#8217;,<br />
&#8216;Email&#8217; =&gt; &#8216;palani@xxxxxx.com&#8217;,<br />
&#8216;Passwd&#8217; =&gt; &#8216;xxxxxxxx&#8217;,<br />
&#8216;service&#8217;=&gt;&#8217;jotspot&#8217;,<br />
&#8216;source&#8217;=&gt;&#8221;,<br />
);   </p>
<p>curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);<br />
curl_setopt($ch, CURLOPT_POST, true);<br />
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);<br />
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);   </p>
<p>$hasil = curl_exec($ch);<br />
echo $hasil;   </p>
<p>$authRaw = strstr($hasil, &#8220;Auth&#8221;);<br />
$authToken = substr($authRaw, 5);</p>
<p>$headers = array(&#8220;Authorization: GoogleLogin auth=$authToken&#8221;);</p>
<p>//echo $headers;<br />
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);<br />
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);<br />
curl_setopt($ch, CURLOPT_HEADER, false);   </p>
<p>$ch = curl_init(&#8220;https://sites.google.com/a/thecuriousminds.net/parents-corner/&#8221;);</p>
<p>$hasil = curl_exec($ch);<br />
echo $hasil;<br />
curl_close($ch);<br />
?&gt;</p>
<p>Getting the Auth tockens:<br />
Auth=DQAAAOEAAAAoFK1cwuepXgZyQhQG58ZeFsZ9RGtNkoFOJlsjAL3h5sc0-m5vwcjBNSTWooYd-JT2huuy_NeSUCrvA1_5_QjH6QsRWLkQfy6Cun81TVzDk4JAWyNz7lq7dM5gs2_0-ncHeq117bI2b09f2VVaolJnkrWO21KL_rw7c_IQZjpT_PoIL3_opUoLvJMvgz1xMWQB6Thpvv8TngPB1UiCw5E10JIEetl0l6mlzobmv77Zq1s3uAGu1tQ&#8211;J8NWANv5NPPANEqckSsIOtWoBVdZ2AZ5JOKYeeKAp9cDcwVivaY5w9lughsxVqdm4MekUL502I </p>
<p>Basically i am trying to access this <a href="https://sites.google.com/a/thecuriousminds.net/parents-corner/" rel="nofollow">https://sites.google.com/a/thecuriousminds.net/parents-corner/</a> through <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym> passing with the google&#8217;s emailId and password.</p>
<p>Pleas help me to fix this, i am trying to fix this very looong time.</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dharmesh</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-2/#comment-291344</link>
		<dc:creator>dharmesh</dc:creator>
		<pubDate>Sat, 19 Nov 2011 13:12:32 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-291344</guid>
		<description>i have problem in paypal describe below

The PayPal API has returned an error!
Error Number:	60
Error Message:	SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed</description>
		<content:encoded><![CDATA[<p>i have problem in paypal describe below</p>
<p>The PayPal API has returned an error!<br />
Error Number:	60<br />
Error Message:	SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WTF</title>
		<link>http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/comment-page-2/#comment-291197</link>
		<dc:creator>WTF</dc:creator>
		<pubDate>Fri, 18 Nov 2011 21:04:32 +0000</pubDate>
		<guid isPermaLink="false">http://unitstep.net/?p=877#comment-291197</guid>
		<description>I had all this working against a specific_site before we renewed our SSL certificate on a specific_site.  I thought I just needed either a single openssl command (which I thought I initially used) or the Firefox export method (described in this article) to grab the new certificate from the specific_site.

The Firefox export method gave me a .pem file similar to the old one, but no joy.

Just for grins, I changed CURLOPT_CAINFO to CURLOPT_CAPATH as mentioned by &quot;70. Timbo&quot; and now it works!  Also, I only used either CURLOPT_CAINFO or CURLOPT_CAPATH, and never both.  Documentation on CURLOPT_CAPATH says you need to use the c_rehash utility, but I point to the file, not the directory, and like I said, it works.

Our PHP version and openssl and curl have not changed.  As far as I know, only the new SSL certificate changed.

WTF?!</description>
		<content:encoded><![CDATA[<p>I had all this working against a specific_site before we renewed our SSL certificate on a specific_site.  I thought I just needed either a single openssl command (which I thought I initially used) or the Firefox export method (described in this article) to grab the new certificate from the specific_site.</p>
<p>The Firefox export method gave me a .pem file similar to the old one, but no joy.</p>
<p>Just for grins, I changed CURLOPT_CAINFO to CURLOPT_CAPATH as mentioned by &#8220;70. Timbo&#8221; and now it works!  Also, I only used either CURLOPT_CAINFO or CURLOPT_CAPATH, and never both.  Documentation on CURLOPT_CAPATH says you need to use the c_rehash utility, but I point to the file, not the directory, and like I said, it works.</p>
<p>Our <acronym class="uttInitialism" title="PHP: Hypertext Preprocessor">PHP</acronym> version and openssl and curl have not changed.  As far as I know, only the new SSL certificate changed.</p>
<p>WTF?!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

