我有一個通過POST發送XML的代碼。但是這段代碼是用PHP編寫的,我在VB.NET中需要它。幫助將此PHP代碼轉換爲VB.NET代碼
將此代碼轉換的任何幫助?
$XMLFile= (here i have created the xml file. XML is encoded ISO-8859)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"URL WHERE I SEND XML");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POSTFIELDS,"XMLDATA=".$XMLFile);
$results=curl_exec ($ch);
curl_close ($ch);
$results=stripslashes($results);
$xmlreturned=new SimpleXMLElement($results);
if($xmlreturned->NotificationResultHeader->RRC==0){
if($xmlreturned->NotificationResultList->NotificationResult->NRC==0){
echo "OK. SUCCES";
和我如何轉換這個PHP代碼太:
$msg=htmlentities($msg);
$msg=urlencode($msg);