I'm creating an XML file and want to send it to an external URL(that starts a PDF download) using POST method without using the form.
I have this form example that I'm trying to avoid.
<form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data">
XML állomány: <input type="file" name="action-xmlagentxmlfile"><br><br>
E-mail értesítő küldés esetén:<br>
<input type="submit" name="generate" value="Számla generálás">
This is how I'm creating my file that I want to send.
$created_xml = ($xmlBuilder->getXML());
file_put_contents(
$order_id.".xml",
$created_xml,
);