Even after hours of research I couldn't find any way to get php code executed through a svg image on an apache server running php.
Is it possible to execute php code in a svg image?
If yes, how?
UPDATE: The function processing the file is:
libxml_disable_entity_loader(false);
$doc = new DOMDocument();
$doc -> loadXML(file_get_contents($imageFile), LIBXML_NOENT | LIBXML_DTDLOAD); // $imageFile contains the .svg
$svg = $doc->getElementByTagName('svg');
echo $svg->item(0)->C14N();
Now I would like to execute custom PHP code that I wrote in the SVG and get the result displayed by echo $svg->item(0)->C14N();
.
The PHP code must be executed on the back-end server that contains above function.