\[code\]wget -d --header="Content-Type:application/xml" --post-data="http://stackoverflow.com/questions/15587725/$(cat <your xml file>)" http://sample.sample.com/api\[/code\]How do i use this function in php?I want also to get the response from this function.i have a variable in php the viable is like this\[code\]$xml = '<sample> <Request target="test"> </Request></sample>'\[/code\]This is the xml that i want to post.I tried the following:\[code\]$url = 'sample.sample.com/api';;$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_POSTFIELDS, "$(cat <".$xml.">)"); // receive server response ...curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);echo $server_output = curl_exec ($ch);curl_close ($ch);\[/code\]But it returned this error:\[quote\] Parsing XML failed: Start tag expected, '<' not found\[/quote\]