Hi guys!
I have a device that is posting RAW data to my php site.
This is the first time I have ever worked with unknown index's.
I'm trying to see what the device is posting but all I ever get is the word "Array" or "a:0{}" or something to that matter.
Here is some of the things I have tried:
I can see the data in wireshark, it's a bunch of TAB delimited data but i can't for the life of me get it into a file for debugging purposes.PHP Code:if (isset($_POST))
{
$string = "1 \n";
$string .= " ".$_POST." \n";
$string .= "2 \n";
$string .= " ".print_r(serialize($_POST), true)." \n";
$string .= "3 \n";
$string .= " ".var_dump($_POST)." \n";
$string .= "4 \n";
$string .= " ".var_export($_POST)." \n";
$string .= "10 \n";
foreach($_POST as $k => $v) {
$string .= "Key: {$k}<br>\r\n";
$string .= "Value: {$v}<br><br>\r\n";
}
$fp = fopen('txtdump.rtf', 'ab');
if ($fp)
{
fwrite($fp,$string);
fclose($fp);
echo 'OK';
}
}
thanks for your input.
-Chad


Reply With Quote

Bookmarks