iserter/easy-lead-capture 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

iserter/easy-lead-capture

Composer 安装命令:

composer require iserter/easy-lead-capture

包简介

Lightweight, embeddable lead capture system with SQLite storage, email notifications, and optional reCAPTCHA v3 protection.

README 文档

README

A lightweight, embeddable lead capture system for PHP. Beautiful forms, SQLite storage, email notifications, optional reCAPTCHA v3 — all in a single Composer package with zero build steps for consumers.

Features

  • Embeddable lead forms — iframe or JS snippet, works on any website
  • Configurable fields — text, email, phone, URL, textarea, multi-select checkboxes
  • Pre-compiled Tailwind CSS — beautiful out of the box (~15KB), customizable colors
  • SQLite storage — zero database setup, WAL mode enabled
  • Email notifications — SMTP, Sendmail, or SES (sent after response for fast submissions)
  • API ping — POST lead data to your own API/webhook on each submission (deferred)
  • reCAPTCHA v3 — optional, configurable score threshold
  • Admin panel — view leads, filter by date, export CSV
  • Lightweight — <20KB iframe payload, no frontend framework

Quick Start

1. Install

composer require iserter/easy-lead-capture

2. Configure

Create public/lead-capture/index.php:

<?php
require __DIR__ . '/../../vendor/autoload.php';

$app = new Iserter\EasyLeadCapture\App([
    'base_path' => '/lead-capture',
    'admin' => [
        'password' => password_hash('your-password', PASSWORD_DEFAULT),
        'email' => 'you@example.com',
        'linkedin_url' => 'https://www.linkedin.com/in/yourprofile',
        'x_url' => 'https://x.com/yourhandle',
    ],
    'form' => [
        'headline' => 'Join the Waitlist',
        'intro_text' => 'Be the first to know when we launch.',
        'fields' => [
            'name'  => ['label' => 'Name', 'required' => true],
            'email' => ['label' => 'E-mail', 'required' => true],
            'phone' => ['label' => 'Phone', 'required' => false],
        ],
    ],
    'on_submit' => [
        'success_headline' => 'Thank you!',
        'success_message' => 'We will get back to you soon.',
        'social_links' => [
            'enabled' => true,
            'message' => 'Follow us for updates.',
        ],
        'ping_api' => [
            'enabled' => false,
            'api_endpoint' => 'https://example.com/api/leads',
            'api_key' => '',
        ],
    ],
    'mail' => [
        'from' => ['address' => 'hello@example.com', 'name' => 'My App'],
        'mailer' => 'smtp',
        'smtp' => [
            'host' => '127.0.0.1',
            'port' => 587,
            'username' => '',
            'password' => '',
        ],
    ],
]);

$app->run();

Add the provided .htaccess to the same directory for Apache, or configure nginx to route requests to index.php.

3. Embed

iframe (recommended):

<iframe src="https://yoursite.com/lead-capture/form"
        style="border:none; width:100%; height:500px;"
        loading="lazy">
</iframe>

JavaScript loader:

<script src="https://yoursite.com/lead-capture/embed.js"></script>
<div id="lead-form"></div>
<script>EasyLeadCapture.render('#lead-form');</script>

4. Admin Panel

Visit /lead-capture/admin to view captured leads and export as CSV.

Requirements

  • PHP 8.1+
  • SQLite3 extension
  • Composer

License

MIT

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固