<?php
$roistatData = array(
'roistat' => isset($_COOKIE['roistat_visit']) ? $_COOKIE['roistat_visit'] : null,
'key' => 'key',
'title' => $hook->getValue('name') . ' (' . $hook->getValue('ticket') . ')',
'name' => $hook->getValue('name'),
'email' => $hook->getValue('email'),
'phone' => $hook->getValue('telephone'),
'is_need_callback' => '0',
);
file_get_contents("https://cloud.roistat.com/api/proxy/1.0/leads/add?" . http_build_query($roistatData));
return true;
&hooks=`hook.Roistat,email,redirect`
[test]
listen = /var/run/test.sock
listen.mode = 0666
user = test
group = test
chdir = /var/www/test
php_admin_value[upload_tmp_dir] = /var/www/test/tmp
php_admin_value[date.timezone] = Europe/Moscow
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 2
pm.max_spare_servers = 4
upstream backend-test {server unix:/var/run/test.sock;}
server {
listen 80;
server_name test.ru;
root /var/www/test;
access_log /var/log/nginx/test-access.log;
error_log /var/log/nginx/test-error.log;
index index.php;
rewrite_log on;
location / {
try_files $uri $uri/ @rewrite;
}
location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass backend-test;
}
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|bmp)$ {
access_log off;
expires 10d;
break;
}
location ~ /\.ht {
deny all;
}
}