warning.php 926 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. require '../../source/bootstrap.inc.php';
  7. $input = file_get_contents('php://input');
  8. if (preg_match('/(\<\!DOCTYPE|\<\!ENTITY)/i', $input)) {
  9. exit('fail');
  10. }
  11. libxml_disable_entity_loader(true);
  12. $obj = simplexml_load_string($input, 'SimpleXMLElement', LIBXML_NOCDATA);
  13. if($obj instanceof SimpleXMLElement && !empty($obj->FeedBackId)) {
  14. $data = array(
  15. 'appid' => trim($obj->AppId),
  16. 'timestamp' => trim($obj->TimeStamp),
  17. 'errortype' => trim($obj->ErrorType),
  18. 'description' => trim($obj->Description),
  19. 'alarmcontent' => trim($obj->AlarmContent),
  20. 'appsignature' => trim($obj->AppSignature),
  21. 'signmethod' => trim($obj->SignMethod),
  22. );
  23. require '../../framework/bootstrap.inc.php';
  24. WeUtility::logging('pay-warning', $input);
  25. }
  26. exit('success');