I have to read an XML file from an URL
$map_url = \"http://maps.google.com/maps/api/directions/xml?origin=\".$merchant_address_url.\"&destination=\".$cus
It is working for me. I think you probably need to use urlencode() on each of the components of $map_url.
urlencode()
$map_url