Responsive Contact Form with Google reCAPTCHA

Description
Create secure, professional contact forms in minutes.
This lightweight PHP script features Google reCAPTCHA v3 integration, built-in SMTP mail sending, spam protection, and no external libraries needed.
Fully responsive and mobile-ready, it's perfect for modern websites that need reliable contact functionality with minimal setup.
Includes JavaScript and PHP validation, honeypot security, and user confirmation emails - all in one clean, customizable package.
🚀 How It Works
- ➤ User fills out the form and submits
- ➤ Client-side JavaScript validates inputs
- ➤ Google reCAPTCHA is verified
- ➤ Honeypot spam trap is checked
- ➤ Admin receives an email
- ➤ User receives a confirmation email
Features
✨ Features
- ✅ Fully responsive layout. Designed to work seamlessly on all screen sizes—desktops, tablets, and mobile devices.
- ✅ Google reCAPTCHA v3 integration. Helps protect your form from bots and spam without user interaction, using invisible background validation.
- ✅ Honeypot spam protection. A simple but effective hidden field technique that blocks most automated spam bots.
- ✅ JavaScript + PHP validation. Ensures that the form is validated both on the client side (for UX) and server side (for security).
- ✅ Built-in SMTP mailer using. Sends messages securely via any SMTP server without relying on third-party libraries.
- ✅ Confirmation email to the user. Automatically sends a confirmation message to users, enhancing trust and communication.
- ✅ No PHPMailer or external libraries needed. Lightweight and dependency-free, making it easy to maintain and deploy.
Requirements
🔧 Requirements
- PHP 7.2+ runtime.
- OpenSSL extension enabled.
fsockopen()must be enabled on your server. (contact us for additional server support).- A valid SMTP account. (e.g., Gmail, Outlook, Zoho, etc).
Instructions
💻 Installation
- ➤ Upload the files to your PHP web server
- ✎ Open
send.phpand edit the configuration section:
// === CONFIGURATION ===
$admin_email = 'your@email.com';
$from_email = 'your@email.com';
$from_name_prefix = 'Your Site Name';
// reCAPTCHA keys (get from https://www.google.com/recaptcha/admin)
$recaptcha_sitekey = 'your-site-key';
$recaptcha_secret = 'your-secret-key';
// SMTP credentials
$smtp_host = 'smtp.yourhost.com';
$smtp_port = 587;
$smtp_user = 'smtp-user@example.com';
$smtp_pass = 'your-smtp-password';
// === END CONFIGURATION ===
- ✎ Edit
index.phpand update this button to use your site key:
<button
class="g-recaptcha"
data-sitekey="your-site-key"
data-callback="onSubmit"
data-action="submit">
Send Message
</button>
| Author | WillAK89 |
|---|---|
| Category | Scripts & Code / PHP Scripts / Forms |
| Price | $12 |
| Extended License | $36 |
| First Release | May 15, 2025 |
| Last Update | May 15, 2025 |
| Files included | .php, .css, .html, JavaScript .js |
Categories
Tags
External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.
Products of the Week.
Submit🥇
Free LinkedIn Likes From Real Members | LinkedInLikes
Get free LinkedIn likes on your posts from real members who react by hand. No password needed: you only share a link.
Website · 12,847 views · 46 clicksWebsite · Week 49 · 12,847 views · 46 clicks
🥈
Free Medium Claps From Real Writers | MediumPlace
Free Medium claps on your stories from verified accounts of real writers, each given by hand. No bots, no Medium password, nothing to pay. Paste a link.
Website · 7,964 views · 10 clicksWebsite · Week 49 · 7,964 views · 10 clicks
🥉
Free GitHub Stars From Real Developers | GitWow
Get free GitHub stars on your repository from real developers who star by hand. No token or password, and it's free.
Website · 15,624 views · 28 clicksWebsite · Week 49 · 15,624 views · 28 clicks
#4
Free Substack Likes From Real Writers | StackRooms
Free Substack likes on your posts and Notes from verified accounts of real writers, given by hand. Free to ask, free to receive. Just share a link.
Website · 7,784 views · 2 clicksWebsite · Week 49 · 7,784 views · 2 clicks
#5
Free Twitter Likes From Real People | SupaTwitter
Free Twitter likes on your tweets from verified accounts of real people, each given by hand. No bots, no Twitter password, nothing to pay. Paste a link.
Website · 7,679 views · 4 clicksWebsite · Week 49 · 7,679 views · 4 clicks
#6
Free X Likes From Real People, Given by Hand | XFast
Free X likes on your posts from verified accounts of real people, each one given by hand. No bots, no X password, no conditions. Paste a link to start.
Website · 7,591 views · 0 clicksWebsite · Week 49 · 7,591 views · 0 clicks