Joywork/webhooks/cian/8826/cian_mess.php

27 lines
762 B
PHP
Raw Normal View History

2026-05-22 20:21:54 +02:00
<?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);