Skip to content

Simple, customizable and secure bootstrap contact form Jquery FREE using Ajax, validations inputs, SMTP protocol, rejected domain and Google reCAPTCHA v3.

Notifications You must be signed in to change notification settings

pattespatte/Contact-Form-PHP-with-cURL

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contact-Form-PHP where file_get_contents has been replaced by curl

version code size closed issues stars

Basic, simple and secure bootstrap contact form. Using Ajax protocol, PHP & JS validations inputs, SMTP mail sending, rejected not found domain and Google reCAPTCHA v3. Jquery FREE.

Live Demo

You can try this form here: https://dev.raspgot.fr/github/contact-form-php

Features

  • PHP 8.3.1 ✔️ (See supported versions)
  • Bootstrap 5.X
  • Ajax submission
  • Google reCAPTCHA v3
  • PHPMailer SMTP Authentication
  • Validation and inputs security (PHP & JS)

Installation

Use clone command or direct download

git clone https://github.com/raspgot/Contact-Form-PHP.git
cd Contact-Form-PHP
php -S localhost:8000

Or use Laragon / XAMMP

Configuration

SMTP sender → HERE GOOGLE keys → HERE More PHPMailer configurations → HERE

/AjaxForm.php Timezones doc → HERE

date_default_timezone_set(''); # your country     

const HOST = ''; # SMTP server
const USERNAME = ''; # SMTP username
const PASSWORD = ''; # SMTP password
const SECRET_KEY = ''; # GOOGLE secret key

/AjaxForm.js

const reCAPTCHA_site_key = 'GOOGLE_PUBLIC_KEY';

/index.html

<script src="https://www.google.com/recaptcha/api.js?render=GOOGLE_PUBLIC_KEY"></script>

You can cuztomise text error:

<div class="valid-feedback">Name looks good</div>
<div class="invalid-feedback">Please provide a valid name</div>

YOU MUST ALLOW cURL OR allow_url_fopen AND php_openssl DIRECTIVE ON YOUR SERVER IN php.ini

  • extension=curl;
  • allow_url_fopen = On
  • extension=php_openssl.dll

Author

logo

You can visit my Portfolio and star this repo if you like it 🤖

Dependencies

About

Simple, customizable and secure bootstrap contact form Jquery FREE using Ajax, validations inputs, SMTP protocol, rejected domain and Google reCAPTCHA v3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 44.7%
  • HTML 29.2%
  • JavaScript 26.1%