27 lines
762 B
PHP
27 lines
762 B
PHP
<?php
|
|
ini_set('display_errors', 1);
|
|
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE);
|
|
|
|
/*$pdo = new MysqlPdo(hst, ndb, user, pass);
|
|
$sql = "SET NAMES 'utf8'";
|
|
$pdo->query($sql);*/
|
|
|
|
$content = file_get_contents('php://input');
|
|
|
|
/*if(isset($_GET['userId'])){
|
|
|
|
$content = $_GET['userId'].' '.$content;
|
|
}*/
|
|
if(isset($_POST)){
|
|
$content." ".json_encode($_POST, JSON_UNESCAPED_UNICODE);
|
|
}
|
|
|
|
$arPath = explode('/', __FILE__);
|
|
|
|
$agency_id = $arPath[count($arPath)-2];
|
|
///$arPath = explode('/', __FILE__);
|
|
file_put_contents($_SERVER['DOCUMENT_ROOT']."/webhooks/cian/".$agency_id."/log_cian.txt", $content."\n", FILE_APPEND);
|
|
//$data = json_decode($content, true);
|
|
|
|
require_once($_SERVER['DOCUMENT_ROOT']."/webhooks/cian.php");
|
|
//var_dump($data);
|