<?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: Uploading a image in php with curl</title>
	<atom:link href="http://www.webuml.com/blog/uploading-a-image-in-php-with-curl/20/feed" rel="self" type="application/rss+xml" />
	<link>http://www.webuml.com/blog/uploading-a-image-in-php-with-curl/20</link>
	<description>Developer Notes</description>
	<lastBuildDate>Wed, 05 May 2010 01:47:12 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: khelo</title>
		<link>http://www.webuml.com/blog/uploading-a-image-in-php-with-curl/20/comment-page-1#comment-31</link>
		<dc:creator>khelo</dc:creator>
		<pubDate>Wed, 18 Nov 2009 23:31:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.webuml.com/blog/?p=20#comment-31</guid>
		<description>Hey , 
are you sure?
what does var_export(is_file($copyTemp)) shows, just before $params declaration?</description>
		<content:encoded><![CDATA[<p>Hey ,<br />
are you sure?<br />
what does var_export(is_file($copyTemp)) shows, just before $params declaration?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timo</title>
		<link>http://www.webuml.com/blog/uploading-a-image-in-php-with-curl/20/comment-page-1#comment-30</link>
		<dc:creator>Timo</dc:creator>
		<pubDate>Wed, 18 Nov 2009 22:50:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.webuml.com/blog/?p=20#comment-30</guid>
		<description>Hey,

I&#039;m using the exact same code, but I keep on getting &quot;failed to create formpost data&quot;. I&#039;ve checked the photo path and i&#039;m pretty sure it perfectly right...

				$fileToCopy 	= $_FILES[&quot;btnBrowse&quot;][&quot;tmp_name&quot;];
				$fileName		= $_FILES[&quot;btnBrowse&quot;][&quot;name&quot;];

				$copyTemp     	= &quot;temppool/testimage.jpg&quot;;
				@copy($fileToCopy, $copyTemp) or die(&quot;can&#039;t copy &quot;.$fileName.&quot; to &quot;.$copyTemp);

				//print $_FILES[&quot;btnBrowse&quot;][&quot;type&quot;];				
				
				$api_sig = md5(&quot;5ed58b4c4fa78297&quot;.&quot;api_key&quot;.&quot;fffaf8c8e4c4b7f016c67b8e03061305&quot;.&quot;auth_token&quot;.$_SESSION[&quot;flickrAuthToken&quot;]);
				
				$params = array(
					&quot;api_key&quot; =&gt; &quot;fffaf8c8e4c4b7f016c67b8e03061305&quot;,
					&quot;auth_token&quot; =&gt; $_SESSION[&quot;flickrAuthToken&quot;],
					&quot;api_sig&quot; =&gt; $api_sig,
					&quot;photo&quot; =&gt; &quot;@$copyTemp;type=&quot;.$_FILES[&quot;btnBrowse&quot;][&quot;type&quot;]
				);
				
				ksort($params);
				
				$curlrequest = curl_init();
				curl_setopt($curlrequest, CURLOPT_URL, &quot;http://api.flickr.com/services/upload/&quot;);
				curl_setopt($curlrequest, CURLOPT_POST, true); 
				curl_setopt($curlrequest, CURLOPT_HEADER, false);
				curl_setopt($curlrequest, CURLOPT_RETURNTRANSFER, true);
				curl_setopt($curlrequest, CURLOPT_POSTFIELDS, $params);</description>
		<content:encoded><![CDATA[<p>Hey,</p>
<p>I&#8217;m using the exact same code, but I keep on getting &#8220;failed to create formpost data&#8221;. I&#8217;ve checked the photo path and i&#8217;m pretty sure it perfectly right&#8230;</p>
<p>				$fileToCopy 	= $_FILES["btnBrowse"]["tmp_name"];<br />
				$fileName		= $_FILES["btnBrowse"]["name"];</p>
<p>				$copyTemp     	= &#8220;temppool/testimage.jpg&#8221;;<br />
				@copy($fileToCopy, $copyTemp) or die(&#8221;can&#8217;t copy &#8220;.$fileName.&#8221; to &#8220;.$copyTemp);</p>
<p>				//print $_FILES["btnBrowse"]["type"];				</p>
<p>				$api_sig = md5(&#8221;5ed58b4c4fa78297&#8243;.&#8221;api_key&#8221;.&#8221;fffaf8c8e4c4b7f016c67b8e03061305&#8243;.&#8221;auth_token&#8221;.$_SESSION["flickrAuthToken"]);</p>
<p>				$params = array(<br />
					&#8220;api_key&#8221; =&gt; &#8220;fffaf8c8e4c4b7f016c67b8e03061305&#8243;,<br />
					&#8220;auth_token&#8221; =&gt; $_SESSION["flickrAuthToken"],<br />
					&#8220;api_sig&#8221; =&gt; $api_sig,<br />
					&#8220;photo&#8221; =&gt; &#8220;@$copyTemp;type=&#8221;.$_FILES["btnBrowse"]["type"]<br />
				);</p>
<p>				ksort($params);</p>
<p>				$curlrequest = curl_init();<br />
				curl_setopt($curlrequest, CURLOPT_URL, &#8220;http://api.flickr.com/services/upload/&#8221;);<br />
				curl_setopt($curlrequest, CURLOPT_POST, true);<br />
				curl_setopt($curlrequest, CURLOPT_HEADER, false);<br />
				curl_setopt($curlrequest, CURLOPT_RETURNTRANSFER, true);<br />
				curl_setopt($curlrequest, CURLOPT_POSTFIELDS, $params);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
