<?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: How to post XML using CURL?</title>
	<atom:link href="http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/</link>
	<description>Future of web development</description>
	<lastBuildDate>Sat, 10 Jul 2010 00:46:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: mandm</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/comment-page-1/#comment-63</link>
		<dc:creator>mandm</dc:creator>
		<pubDate>Sat, 10 Jul 2010 00:46:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=409#comment-63</guid>
		<description>Thanks for your patient replies once again....

actually my end goal is to post an XML to a site, but what should me my changes in this case?

and yes to view the response i have this file server.php

$xml = file_get_contents(&#039;client.php&#039;); 
$xml = new SimpleXMLElement($xml, LIBXML_NOCDATA, false); 

$response = (string) $xml; 
$response = strtoupper($response); 

echo $response;</description>
		<content:encoded><![CDATA[<p>Thanks for your patient replies once again&#8230;.</p>
<p>actually my end goal is to post an XML to a site, but what should me my changes in this case?</p>
<p>and yes to view the response i have this file server.php</p>
<p>$xml = file_get_contents(&#8216;client.php&#8217;);<br />
$xml = new SimpleXMLElement($xml, LIBXML_NOCDATA, false); </p>
<p>$response = (string) $xml;<br />
$response = strtoupper($response); </p>
<p>echo $response;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: om</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/comment-page-1/#comment-62</link>
		<dc:creator>om</dc:creator>
		<pubDate>Sat, 10 Jul 2010 00:33:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=409#comment-62</guid>
		<description>your type is xml but you are not posting XML file.</description>
		<content:encoded><![CDATA[<p>your type is xml but you are not posting XML file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: om</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/comment-page-1/#comment-61</link>
		<dc:creator>om</dc:creator>
		<pubDate>Sat, 10 Jul 2010 00:32:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=409#comment-61</guid>
		<description>you are not sending XML file. while you are using Content-Type: text/xml

Where you want to send xml file?</description>
		<content:encoded><![CDATA[<p>you are not sending XML file. while you are using Content-Type: text/xml</p>
<p>Where you want to send xml file?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mandm</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/comment-page-1/#comment-60</link>
		<dc:creator>mandm</dc:creator>
		<pubDate>Sat, 10 Jul 2010 00:27:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=409#comment-60</guid>
		<description>ok so i just tried this and when i execute php client.php, it returns 

it does not return &quot;Testing&quot; back
???

&lt;?php

$xml     = &#039;Testing&#039;;
$server  = &#039;server.php&#039;; // URL to server.php

$ch = curl_init($server);
curl_setopt($ch, CURLOPT_MUTE, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, &quot;$xml&quot;);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(&#039;Content-Type: text/xml&#039;));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);

echo &#039;&#039;, simplexml_load_string($response), &#039;&#039;;</description>
		<content:encoded><![CDATA[<p>ok so i just tried this and when i execute php client.php, it returns </p>
<p>it does not return &#8220;Testing&#8221; back<br />
???</p>
<p>&lt;?php</p>
<p>$xml     = &#039;Testing&#8217;;<br />
$server  = &#8216;server.php&#8217;; // URL to server.php</p>
<p>$ch = curl_init($server);<br />
curl_setopt($ch, CURLOPT_MUTE, 1);<br />
curl_setopt($ch, CURLOPT_POST, 1);<br />
curl_setopt($ch, CURLOPT_POSTFIELDS, &#8220;$xml&#8221;);<br />
curl_setopt($ch, CURLOPT_HTTPHEADER, array(&#8216;Content-Type: text/xml&#8217;));<br />
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />
$response = curl_exec($ch);<br />
curl_close($ch);</p>
<p>echo &#8221;, simplexml_load_string($response), &#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: om</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/comment-page-1/#comment-59</link>
		<dc:creator>om</dc:creator>
		<pubDate>Sat, 10 Jul 2010 00:16:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=409#comment-59</guid>
		<description>$xml = simplexml_load_string($output);</description>
		<content:encoded><![CDATA[<p>$xml = simplexml_load_string($output);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: om</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/comment-page-1/#comment-58</link>
		<dc:creator>om</dc:creator>
		<pubDate>Sat, 10 Jul 2010 00:13:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=409#comment-58</guid>
		<description>you should see page source code too.</description>
		<content:encoded><![CDATA[<p>you should see page source code too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: om</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/comment-page-1/#comment-57</link>
		<dc:creator>om</dc:creator>
		<pubDate>Sat, 10 Jul 2010 00:12:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=409#comment-57</guid>
		<description>You can check output using  echo $output; 

  # $output = curl_exec($ch);</description>
		<content:encoded><![CDATA[<p>You can check output using  echo $output; </p>
<p>  # $output = curl_exec($ch);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mandm</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/comment-page-1/#comment-56</link>
		<dc:creator>mandm</dc:creator>
		<pubDate>Fri, 09 Jul 2010 23:54:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=409#comment-56</guid>
		<description>yes curl is enabled on my server and how do i check if the any response is coming back ?</description>
		<content:encoded><![CDATA[<p>yes curl is enabled on my server and how do i check if the any response is coming back ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: om</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/comment-page-1/#comment-55</link>
		<dc:creator>om</dc:creator>
		<pubDate>Fri, 09 Jul 2010 23:50:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=409#comment-55</guid>
		<description>First do one thing. Try a to Execute a small CURL code in your server. There are tones of examples over internet and make sure that CURL is enabled in your server. You can check using phpinfo().

Do you know, if there is any response come back in your case when you send XML request using CURL?</description>
		<content:encoded><![CDATA[<p>First do one thing. Try a to Execute a small CURL code in your server. There are tones of examples over internet and make sure that CURL is enabled in your server. You can check using phpinfo().</p>
<p>Do you know, if there is any response come back in your case when you send XML request using CURL?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mandm</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/comment-page-1/#comment-53</link>
		<dc:creator>mandm</dc:creator>
		<pubDate>Fri, 09 Jul 2010 23:24:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=409#comment-53</guid>
		<description>can you tell me how i could get the action url to return something on the screen ?

another thing i just noticed, so i thought i might ask you, i have seen my php is becoming very slow and unresponsive while trying out all these curl options? any guesses</description>
		<content:encoded><![CDATA[<p>can you tell me how i could get the action url to return something on the screen ?</p>
<p>another thing i just noticed, so i thought i might ask you, i have seen my php is becoming very slow and unresponsive while trying out all these curl options? any guesses</p>
]]></content:encoded>
	</item>
</channel>
</rss>
