Helo friends

i am trying to use the XML file to send data to api but i am getting a error due to & character used in link Where (XXXXXXXX&apiToken=XXXXXXXX&payload=)

But If I Copy past the link in url bar it is working fine below is the example

and i want to know how to pass variables to xml file from php

kiendly help me

thank You

            <attribute name="AAAAA">zzzzzzzzzz</attribute>
            <attribute name="BBBBB">zzzzzzzzzz</attribute>
            <attribute name="CCCCC">zzzzzzzzzz</attribute>
            <attribute name="DDDDD">zzzzzzzzzz</attribute>
            <attribute name="EEEEE">zzzzzzzzzz</attribute>