On Thursday, December 22, 2011 8:21:24 AM UTC+1, Sebo wrote:
>
> I answered your question at
> stack*overflow*<http://stackoverflow.com/questions/8541305/how-to-catch-xml-packets-that-consoleexport-firebug-extension-sends>
> .
>
> @Honza:
> While testing that out right now with the example I posted there, I saw
> the file being created, but there are no GET or POST parameters sent. Do
> you have an explanation for that?
I am not PHP expert, but I guess that's because the PHP script is wrong.
Note that the content-Type of the posted data is application/xml
Here is new version of the script that works for me:
<?php
$filename = 'consoleexport.log';
if (!$handle = fopen($filename, 'a'))
{
echo 'File "'.$filename.'" could not be opened';
exit;
}
ob_start();
$content = file_get_contents('php://input');
$content .= "\n";
ob_clean();
if (!fwrite($handle, $content))
{
echo 'Can\'t write into file "'.$filename.'"';
exit;
}
echo 'Done!';
fclose($handle);
?>
Honza
--
You received this message because you are subscribed to the Google
Groups "Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
https://groups.google.com/forum/#!forum/firebug