Files
Harvey_Team_Page/api/config.sample.php
T
FastD b60d00d55c Ads readiness, lead delivery, project inventory
- SEO/ads: title, description, canonical, OG 1200x630, JSON-LD, robots, sitemap, .htaccess
- Privacy policy page with operator data; server-side consent check; cookie reset in footer
- Metrika loads only after cookie consent; goals lead / email_click / phone_click; utm and yclid stored with the lead
- Form delivery: store, Telegram, SMTP, webhook; config presets; dev stub
- Project window shows public sections only; Moba copy rewritten
- Fix 14 px horizontal overflow in the filter bar on phones
- Move history to archive/; add docs/project-inventory.md and docs/lead-delivery.md
2026-11-10 18:22:55 +03:00

63 lines
3.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copy this file to config.php and fill in real values.
* config.php is gitignored — never commit credentials.
*
* Every channel with a non-empty value is used, in this order:
* 1. store — ALWAYS on. Lead is appended to api/var/leads/YYYY-MM.jsonl.
* 2. telegram — BOT_TOKEN + TG_CHAT_ID
* 3. email — MAIL_TO + (SMTP_* or MAIL_MODE = 'mail')
* 4. webhook — WEBHOOK_URL (+ optional WEBHOOK_TOKEN)
*
* The form reports success when at least one of 2–4 accepted the lead.
* With everything empty the endpoint answers 500 — the form is never silently dead.
*/
/* ---------- 1. Telegram ----------
* Bot: @BotFather → /newbot. Add the bot to the target chat, send any message
* (for groups: /start@your_bot), then GET
* https://api.telegram.org/bot<TOKEN>/getUpdates and read message.chat.id
* (group ids start with '-'). */
const BOT_TOKEN = '';
const TG_CHAT_ID = '';
/* ---------- 2. Email ----------
* MAIL_MODE = 'smtp' — the built-in client (AUTH LOGIN + SSL/STARTTLS), no Composer.
* MAIL_MODE = 'mail' — PHP mail(); works on many shared hosts, weaker deliverability.
*
* MAIL_FROM must belong to the domain that has SPF/DKIM configured, otherwise
* Gmail/VK/Yandex will spam-filter every lead.
*
* Presets (copy the block you need):
* Yandex 360: SMTP_HOST = 'smtp.yandex.ru'; SMTP_PORT = 465; SMTP_SECURE = 'ssl';
* SMTP_USER = 'site@harveymonsterteam.ru'; (password = app password)
* Mail.ru: SMTP_HOST = 'smtp.mail.ru'; SMTP_PORT = 465; SMTP_SECURE = 'ssl';
* Unisender Go:SMTP_HOST = 'smtp.go1.unisender.ru'; SMTP_PORT = 587; SMTP_SECURE = 'tls';
* SendPulse: SMTP_HOST = 'smtp-pulse.com'; SMTP_PORT = 465; SMTP_SECURE = 'ssl';
* Mailgun: SMTP_HOST = 'smtp.mailgun.org'; SMTP_PORT = 587; SMTP_SECURE = 'tls';
* Brevo: SMTP_HOST = 'smtp-relay.brevo.com'; SMTP_PORT = 587; SMTP_SECURE = 'tls';
* Timeweb: SMTP_HOST = 'smtp.timeweb.ru'; SMTP_PORT = 465; SMTP_SECURE = 'ssl';
*/
const MAIL_MODE = 'smtp'; // 'smtp' | 'mail'
const MAIL_TO = 'monsterharvi@gmail.com';
const MAIL_FROM = 'site@harveymonsterteam.ru';
const MAIL_FROM_NAME = 'Harvey Monster Team';
const MAIL_SUBJECT = 'Заявка с harveymonsterteam.ru';
const SMTP_HOST = '';
const SMTP_PORT = 465;
const SMTP_SECURE = 'ssl'; // 'ssl' (465) | 'tls' (587, STARTTLS) | '' (25, plain)
const SMTP_USER = '';
const SMTP_PASS = '';
/* ---------- 3. Webhook ----------
* Any endpoint that accepts JSON:
* {"site","sent_at","name","contact","message","consent","meta":{utm,yclid,…}}
* Works directly with Make / n8n / Zapier / Albato / a custom handler.
* Native CRM and ESP APIs (Bitrix24, amoCRM, Unisender, SendPulse) need their own
* field mapping — point the webhook at a no-code scenario that does the mapping
* (recipe in docs/lead-delivery.md), not at the API URL directly.
* WEBHOOK_TOKEN, when set, is sent as `Authorization: Bearer <token>`. */
const WEBHOOK_URL = '';
const WEBHOOK_TOKEN = '';