I have a PHP CURL query which is of the form curl -u emailid:password -H "Content-Type: application/xml" -d "[email protected] Details" -X POST http://url/xxx.xml
The query works fine for all email addresses except those that have &
, ?
or .
where I get an xml query format error.
When I replace &
with &
the &
problem is solved.
However, I am unable to find a replacement for ?
and .
I tried the replacements ?
for ?
and .
for .
but I still get an error.