$data = '%3C?xml%20version=%221.0%22%20encoding=%22ISO-8859-%22?%3E%3C!DOCTYPE%20 MESSAGE%20SYSTEM%20%22http://127.0.0.1/psms/dtd/messagev12.dtd.dtd%22%20%3E%3CMESSAGE%3E%3CUSER%20USERNAME=%22username%22%20PASWORD=%22XXXXX%22/%3E%3CSMS%20%20UDH=%220%22%20CODING=%221%22%20TEXT=%22The%20flight%20%23&btnG;%20<101>%20"DEL"%20to%20"BLR"%20is%20delayed%20and%20it's%20%20revised%20time%20will%20be%20informed%20later.%20Have%20a%20nice%20day!%22%20PROPERTY=%220%22%20ID=%221%22%3E%3CADDRESS%20FROM=%22919902202099%22%20TO=%22919886094024%22%20SEQ=%221%22%20TAG=%22some%20clientside%20random%20data%22%20/%3E%3C/SMS%3E%3C/MESSAGE%3E';
$url = "http://api.myvaluefirst.com/psms/servlet/psms.Eservice2";
$ch = curl_init(); // initialize curl handle
curl_setopt($ch, CURLOPT_URL,$url); // set url to post to
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
curl_setopt($ch, CURLOPT_TIMEOUT, 5); // times out after 4s
curl_setopt($ch, CURLOPT_POST, 1); // set POST method
curl_setopt($ch, CURLOPT_POSTFIELDS, "data="+($data)+"&action=send"); // add POST fields
$result = curl_exec($ch); // run the whole process
curl_close($ch);
echo $result;