-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathserver.php
14 lines (13 loc) · 891 Bytes
/
server.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
if ( $_POST['stacktrace'] == "" || $_POST['package_version'] == "" || $_POST['package_name'] == "" ) {
die("This script is used to collect field test crash stacktraces. No personal information is transmitted, collected or stored.<br/>For more information, please contact <a href='mailto:[email protected]'>[email protected]</a>");
}
$random = rand(1000,9999);
$version = $_POST['package_version'];
$package = $_POST['package_name'];
$handle = fopen($package."-trace-".$version."-".time()."-".$random, "w+");
fwrite($handle, $_POST['stacktrace']);
fclose($handle);
// Uncomment and change the following line to have exceptions mailed to you
//mail("[email protected]","IMPORTANT: Exception received (".$version.")",$_POST['stacktrace'], "from:[email protected]");
?>