<?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: 21 Incredibly Useful Things You Can Do With cURL and PHP</title>
	<atom:link href="http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/</link>
	<description>This is the home of Addy Osmani (Web Developer, Designer &#38; Author). Here you can find some great tips and tutorials on everything to do with web development and even a few useful code samples!</description>
	<lastBuildDate>Fri, 30 Jul 2010 04:17:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Dipanjan</title>
		<link>http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/comment-page-1/#comment-1553</link>
		<dc:creator>Dipanjan</dc:creator>
		<pubDate>Sun, 07 Mar 2010 17:59:14 +0000</pubDate>
		<guid isPermaLink="false">http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/#comment-1553</guid>
		<description>curl_exec($ch); 
curl_setopt($ch, CURLOPT_POST, 0); 
curl_setopt($ch, CURLOPT_URL, &#039;http://m.facebook.com/profile.php?id=&#039;.$id); 
$page = curl_exec($ch); 
$profile_pic=substr($page,strpos($page,&#039;http://profile.&#039;),(strpos($page,&#039;class=&quot;p&quot;&#039;)-strpos($page,&#039;http://profile.&#039;))-2); 
echo &#039;&lt;img src=&quot;&#039;.$profile_pic.&#039;&quot; width=&quot;50&quot;&gt;&#039;; 
Thanx for your code. Please let me know if there is a better solution&lt;/img&gt; </description>
		<content:encoded><![CDATA[<p>curl_exec($ch);<br />
curl_setopt($ch, CURLOPT_POST, 0);<br />
curl_setopt($ch, CURLOPT_URL, &#039;http://m.facebook.com/profile.php?id=&#039;.$id);<br />
$page = curl_exec($ch);<br />
$profile_pic=substr($page,strpos($page,&#039;http://profile.&#039;),(strpos($page,&#039;class=&quot;p&quot;&#039;)-strpos($page,&#039;http://profile.&#039;))-2);<br />
echo &#039;&lt;img src=&quot;&#039;.$profile_pic.&#039;&quot; width=&quot;50&quot;&gt;&#039;;<br />
Thanx for your code. Please let me know if there is a better solution</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dipanjan</title>
		<link>http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/comment-page-1/#comment-1554</link>
		<dc:creator>Dipanjan</dc:creator>
		<pubDate>Sun, 07 Mar 2010 17:59:06 +0000</pubDate>
		<guid isPermaLink="false">http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/#comment-1554</guid>
		<description>I have done this: 
                                           $login_email = XXXXXXXXX; 
$login_pass = &#039;XXXXXXXXXXX&#039;; 
 
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, &#039;https://login.facebook.com/login.php?m&amp;next=http%3A%2F%2Fm.facebook.com%2Fhome.php&#039;); 
curl_setopt($ch, CURLOPT_POSTFIELDS,&#039;email=&#039;.urlencode($login_email).&#039;&amp;pass=&#039;.urlencode($login_pass).&#039;&amp;login=Login&#039;); 
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_HEADER, 0); 
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
curl_setopt($ch, CURLOPT_COOKIEJAR, &quot;my_cookies.txt&quot;); 
curl_setopt($ch, CURLOPT_COOKIEFILE, &quot;my_cookies.txt&quot;); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_USERAGENT, &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3&quot;); 
 </description>
		<content:encoded><![CDATA[<p>I have done this:<br />
                                           $login_email = XXXXXXXXX;<br />
$login_pass = &#039;XXXXXXXXXXX&#039;; </p>
<p>$ch = curl_init();<br />
curl_setopt($ch, CURLOPT_URL, &#039;https://login.facebook.com/login.php?m&amp;amp;next=http%3A%2F%2Fm.facebook.com%2Fhome.php&#039;);<br />
curl_setopt($ch, CURLOPT_POSTFIELDS,&#039;email=&#039;.urlencode($login_email).&#039;&amp;pass=&#039;.urlencode($login_pass).&#039;&amp;login=Login&#039;);<br />
curl_setopt($ch, CURLOPT_POST, 1);<br />
curl_setopt($ch, CURLOPT_HEADER, 0);<br />
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);<br />
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);<br />
curl_setopt($ch, CURLOPT_COOKIEJAR, &quot;my_cookies.txt&quot;);<br />
curl_setopt($ch, CURLOPT_COOKIEFILE, &quot;my_cookies.txt&quot;);<br />
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />
curl_setopt($ch, CURLOPT_USERAGENT, &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3&quot;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Addy</title>
		<link>http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/comment-page-1/#comment-1551</link>
		<dc:creator>Addy</dc:creator>
		<pubDate>Sun, 07 Mar 2010 16:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/#comment-1551</guid>
		<description>Thank you! </description>
		<content:encoded><![CDATA[<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Addy</title>
		<link>http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/comment-page-1/#comment-1552</link>
		<dc:creator>Addy</dc:creator>
		<pubDate>Sun, 07 Mar 2010 16:15:34 +0000</pubDate>
		<guid isPermaLink="false">http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/#comment-1552</guid>
		<description>It depends on what you&#039;re trying to do. If you&#039;re only interested in the thumbnail (and not a higher res version) you should just be able to load in the URL to their friend profile directly and use regular expressions to extract the URL to their friend image. That said, it might just be easier for you to try doing this via the Facebook API as they have methods for grabbing friend images fairly painlessly. </description>
		<content:encoded><![CDATA[<p>It depends on what you&#039;re trying to do. If you&#039;re only interested in the thumbnail (and not a higher res version) you should just be able to load in the URL to their friend profile directly and use regular expressions to extract the URL to their friend image. That said, it might just be easier for you to try doing this via the Facebook API as they have methods for grabbing friend images fairly painlessly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Addy</title>
		<link>http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/comment-page-1/#comment-1548</link>
		<dc:creator>Addy</dc:creator>
		<pubDate>Sun, 07 Mar 2010 16:14:10 +0000</pubDate>
		<guid isPermaLink="false">http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/#comment-1548</guid>
		<description>I&#039;ve been personally using the Official API for all Facebook related things for a while now, but if you&#039;re interested in some alternative code for achieving this via CURL, here&#039;s a nice little snippet from Snipplr &lt;a href=&quot;http://snipplr.com/view/29070/how-to-change-facebook-status-with-php/&quot; target=&quot;_blank&quot;&gt;http://snipplr.com/view/29070/how-to-change-faceb...&lt;/a&gt; </description>
		<content:encoded><![CDATA[<p>I&#039;ve been personally using the Official API for all Facebook related things for a while now, but if you&#039;re interested in some alternative code for achieving this via CURL, here&#039;s a nice little snippet from Snipplr <a href="http://snipplr.com/view/29070/how-to-change-facebook-status-with-php/" target="_blank"></a><a href="http://snipplr.com/view/29070/how-to-change-faceb.." rel="nofollow">http://snipplr.com/view/29070/how-to-change-faceb..</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Addy</title>
		<link>http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/comment-page-1/#comment-1549</link>
		<dc:creator>Addy</dc:creator>
		<pubDate>Sun, 07 Mar 2010 16:14:10 +0000</pubDate>
		<guid isPermaLink="false">http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/#comment-1549</guid>
		<description>I&#039;ve been personally using the Official API for all Facebook related things for a while now, but if you&#039;re interested in some alternative code for achieving this via CURL, here&#039;s a nice little snippet from Snipplr &lt;a href=&quot;http://snipplr.com/view/29070/how-to-change-facebook-status-with-php/&quot; target=&quot;_blank&quot;&gt;http://snipplr.com/view/29070/how-to-change-faceb...&lt;/a&gt; </description>
		<content:encoded><![CDATA[<p>I&#039;ve been personally using the Official API for all Facebook related things for a while now, but if you&#039;re interested in some alternative code for achieving this via CURL, here&#039;s a nice little snippet from Snipplr <a href="http://snipplr.com/view/29070/how-to-change-facebook-status-with-php/" target="_blank"></a><a href="http://snipplr.com/view/29070/how-to-change-faceb.." rel="nofollow">http://snipplr.com/view/29070/how-to-change-faceb..</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Addy</title>
		<link>http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/comment-page-1/#comment-1550</link>
		<dc:creator>Addy</dc:creator>
		<pubDate>Sun, 07 Mar 2010 16:14:10 +0000</pubDate>
		<guid isPermaLink="false">http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/#comment-1550</guid>
		<description>I&#039;ve been personally using the Official API for all Facebook related things for a while now, but if you&#039;re interested in some alternative code for achieving this via CURL, here&#039;s a nice little snippet from Snipplr &lt;a href=&quot;http://snipplr.com/view/29070/how-to-change-facebook-status-with-php/&quot; target=&quot;_blank&quot;&gt;http://snipplr.com/view/29070/how-to-change-faceb...&lt;/a&gt; </description>
		<content:encoded><![CDATA[<p>I&#039;ve been personally using the Official API for all Facebook related things for a while now, but if you&#039;re interested in some alternative code for achieving this via CURL, here&#039;s a nice little snippet from Snipplr <a href="http://snipplr.com/view/29070/how-to-change-facebook-status-with-php/" target="_blank"></a><a href="http://snipplr.com/view/29070/how-to-change-faceb.." rel="nofollow">http://snipplr.com/view/29070/how-to-change-faceb..</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dipanjan</title>
		<link>http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/comment-page-1/#comment-1547</link>
		<dc:creator>Dipanjan</dc:creator>
		<pubDate>Sun, 07 Mar 2010 16:06:02 +0000</pubDate>
		<guid isPermaLink="false">http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/#comment-1547</guid>
		<description>How to fetch friend image after logging in facebook or myspace or orkut using curl? </description>
		<content:encoded><![CDATA[<p>How to fetch friend image after logging in facebook or myspace or orkut using curl?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: omar</title>
		<link>http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/comment-page-1/#comment-903</link>
		<dc:creator>omar</dc:creator>
		<pubDate>Wed, 17 Feb 2010 00:22:03 +0000</pubDate>
		<guid isPermaLink="false">http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/#comment-903</guid>
		<description>I believe the facebook update one is the really old version which doesn&#039;t work anymore </description>
		<content:encoded><![CDATA[<p>I believe the facebook update one is the really old version which doesn&#039;t work anymore</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/comment-page-1/#comment-863</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sun, 07 Feb 2010 18:25:10 +0000</pubDate>
		<guid isPermaLink="false">http://addyosmani.com/blog/21-incredibly-useful-things-you-can-do-with-curl-and-php/#comment-863</guid>
		<description>Really nice! </description>
		<content:encoded><![CDATA[<p>Really nice!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
