This is a PHP application for sending one-time passwords (OTPs) via SMS using the Excite SMS API. Users can request an OTP, which is sent to their phone number, and then verify the OTP for authentication.
- Send OTPs via SMS using the Excite SMS API.
- Basic form for entering the recipient's phone number.
- OTP verification with immediate feedback.
- Basic CSS styling for a clean and user-friendly interface.
- PHP
- cURL for making API requests
- HTML and CSS for the user interface
To get started with this application, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/kazashim/otp-sms-php.git cd otp-sms-php
-
Open the
index.php
file in your web browser. You should see the OTP request form. -
Fill out the recipient's phone number and click the "Send OTP" button to request an OTP.
-
You will be redirected to the OTP verification page. Enter the OTP received via SMS and click "Verify OTP."
-
A confirmation message will be displayed indicating whether the OTP verification was successful or not.
- Fill out the recipient's phone number in the form provided on the OTP request page.
- Click the "Send OTP" button to request an OTP.
- You will be redirected to the OTP verification page. Enter the OTP received via SMS and click "Verify OTP."
- A confirmation message will inform you whether the OTP verification was successful.
To use this application, you need to configure the Excite SMS API credentials. Modify the $api_key
variable in the send_otp.php
file to include your API key:
// Replace with your Excite SMS API key
$api_key = 'YOUR_API_KEY_HERE';
The application includes basic CSS styling for a clean and user-friendly interface. You can customize the CSS further by editing the style.css
file in the css
directory.
This project is licensed under the MIT License. See the LICENSE file for details.
- Excite SMS for providing the SMS gateway API.
Secure your application with OTPs!