我从第三方购买的sms网关集成问题

I am having issue in my sms gateway integration. I purchased from third party? I want to know how to get the delivery status? Here I will list the documentation also.kindly go ahead?How do I get my message Id from Api.

Get Delivery Reports
For checking delivery report use the URL given below:
http://t.dialmenow.info/getDLR.jsp?userid=username&password=password&messageid=1,2&externalid=1,2&drquantity=X&fromdate=yyyy-mm-dd hh:mm:ss&todate=yyyy-mm-ddhh:mm:ss&redownload=yes&responcetype=xml
messageid=>When you send a message you will get an unique message id from API and you have to use this
message id for getting the deliver status for that message.

Here is my sms code:

    if(isset($_REQUEST['send']))
{
$mobile=$_REQUEST['mobile'];
$message=urlencode($_REQUEST['message']);
$ID = 'xxxx'; 
$Pwd = 'xxxxxx'; 
$url="http://t.dialmenow.info/sendsms.jsp?user=$ID&password=$Pwd&mobiles=$mobile&sms=$message&senderid =MEDVNN&messageid=1";
//echo $url;
$ret = file($url);
echo "<pre>";
print_r($ret);
echo $ret[9];
}
?>

My questions are:

  1. How do I get the message id form delivery reports.
  2. IF you see my $Text = 'welcome to US'; here I have another problem If I give space in $Text variable the message is not coming to my mobile

Can any one guide me what I have to do further.