lonelydragon
Programmer
hi, everyone:
i have a problem on my project.
i am tring to write a code on the server to retrieve data(file) that customer sent via Curl. my code is on the server side. but i don't know how to retrieve the data(file). thank you for your help.
the code on that customer si sending...
$ch = curl_init("
$fp = fopen('xml_a.xml','r');
while (!feof($fp)){
$xmlContent .= fread($fp,4096);
}
$xmlContent = "nannan";
$url = "
curl_setopt($ch, CURLOPT_HTTPHEADER,array("Content-type: text/xml"));
curl_setopt($ch, CURLOPT_URL,$url); // set url to post to
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4); // times out after 4s
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlContent);
$result = curl_exec($ch) or die($xmlContent);
i have a problem on my project.
i am tring to write a code on the server to retrieve data(file) that customer sent via Curl. my code is on the server side. but i don't know how to retrieve the data(file). thank you for your help.
the code on that customer si sending...
$ch = curl_init("
$fp = fopen('xml_a.xml','r');
while (!feof($fp)){
$xmlContent .= fread($fp,4096);
}
$xmlContent = "nannan";
$url = "
curl_setopt($ch, CURLOPT_HTTPHEADER,array("Content-type: text/xml"));
curl_setopt($ch, CURLOPT_URL,$url); // set url to post to
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4); // times out after 4s
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlContent);
$result = curl_exec($ch) or die($xmlContent);