

AI Chatbot Free Models - PHP ScriptAI Chatbot Free Models - PHP Script
Add an AI Chatbot to Your Site! PHP, Self-Hosted, Customizable, Full Admin Panel, Easy Embed.
AI Chatbot Free Models - PHP Script
Add an AI Chatbot to Your Site! PHP, Self-Hosted, Customizable, Full Admin Panel, Easy Embed.
Overview
Supercharge Your Website with a Smart & Customizable AI Chatbot!
Easily integrate a powerful and flexible PHP-based AI chatbot
into your website! This script allows you to offer 24/7 assistance,
increase visitor engagement, and automate responses, all managed through
a comprehensive and intuitive admin panel.
No monthly fees for the script, full control over your data and configuration.
Key Features:
- Full-Featured Admin Panel: Manage settings, knowledge base, AI rules, styling, messages, images, sounds, and translations.
- Advanced Conversational AI: Integrates with AI models (e.g., via OpenRouter.ai or similar) to provide natural and relevant responses.
- Highly Customizable: Modify the bot's appearance (colors, icons, logo) and behavior to perfectly match your brand.
- Dedicated Knowledge Base: Teach your chatbot everything it needs to know about your site, products, or services.
- Message Management & Export: View saved conversations and export them in various formats (TXT, CSV, HTML, MD).
- Multi-Language Support (i18n): Ready for a global audience thanks to the gettext system.
- Simple Integration: Add the chatbot to your site with a single line of JavaScript (`embed.js`).
- Self-Hosted & PHP-Based: Full control, no dependency on external platforms for the script itself. Lightweight SQLite database.
- Responsive Design: Looks great on desktops, tablets, and mobile devices.
Ideal For:
- Business websites and blogs.
- E-commerce stores (with proper knowledge base setup).
- Providing automated customer support.
- Increasing user interaction and guiding visitors.
What's Included:
All PHP, JavaScript, CSS source files, ready-to-use language
files (.po/.mo) for translations, and clear documentation for
installation and configuration.
Elevate your website with the power of conversational AI!
Features
Key Features:
- Full-Featured Admin Panel: Manage settings, knowledge base, AI rules, styling, messages, images, sounds, and translations.
- Advanced Conversational AI: Integrates with AI models (e.g., via OpenRouter.ai or similar) to provide natural and relevant responses.
- Highly Customizable: Modify the bot's appearance (colors, icons, logo) and behavior to perfectly match your brand.
- Dedicated Knowledge Base: Teach your chatbot everything it needs to know about your site, products, or services.
- Message Management & Export: View saved conversations and export them in various formats (TXT, CSV, HTML, MD).
- Multi-Language Support (i18n): Ready for a global audience thanks to the gettext system.
- Simple Integration: Add the chatbot to your site with a single line of JavaScript (`embed.js`).
- Self-Hosted & PHP-Based: Full control, no dependency on external platforms for the script itself. Lightweight SQLite database.
- Responsive Design: Looks great on desktops, tablets, and mobile devices.
Requirements
Before installing, please ensure your server meets the following requirements:
- Web Server: Apache, Nginx, or similar with PHP support.
- PHP Version: 7.4 or higher is recommended.
-
PHP Extensions:
sqlite3
(for database operations)fileinfo
(for MIME type validation on uploads)gettext
(for internationalization/translations)mbstring
(for UTF-8 string handling)
-
Write Permissions: The web server must have write permissions for:
- ###licode###db.db).###licode###images/ subfolder (for image uploads).###licode###sounds/ subfolder (for sound uploads).
Instructions
Installation & Setup Instructions:
1. Installation Steps
- Download & Unzip: Download the ZIP file from Codester and unzip it on your computer.
-
Upload Files: Upload all the extracted files and folders (including
admin.php
,chatbot.php
,embed.js
,languages/
,images/
,sounds/
, etc.) to a directory on your web server. This could be the root of your website or a sub-directory (e.g.,/chatbot-ai/
). -
Set Permissions (Crucial!):
- Ensure your web server has write permissions on the main directory where you uploaded the chatbot files. This is essential for the script to create and write to the
db.db
(SQLite database) file.###licode###images/ and
sounds/
subfolders also require write permissions for file uploads. If these folders do not exist, the server must have permission to create them, or you should create them manually and grant write permissions. - Ensure your web server has write permissions on the main directory where you uploaded the chatbot files. This is essential for the script to create and write to the
- Tip: Common permissions are
755
for directories and644
for files. The main chatbot directory might temporarily need775
or777
if thedb.db
file is not being created (remember to revert to safer permissions like755
once the database is initialized). Consult your hosting provider's documentation for specific guidance on setting permissions. -
Initialize Database & Admin Account:
- Open your web browser and navigate to the
login.php
file within your chatbot's directory. For example: /your-chatbot-folder/login.php - If this is the first time accessing the script, it will automatically attempt to create the
db.db
database file and the necessary tables. - You should then be presented with a form to create your first administrator account. Fill in your desired username and password, and submit the form.
- If an administrator account already exists (e.g., from a previous setup or if the database was already initialized), you will see the standard login page.
- Open your web browser and navigate to the
-
Log In to Admin Panel: Once the admin account
is created (or if it already existed), log in using your credentials.
You will be redirected to the main admin panel (
admin.php
).
2. Initial Admin Configuration
After successfully logging into the admin panel:
- Navigate to the "Settings" tab.
-
Configure API Key & AI Model:
- Enter your API Key from OpenRouter.ai (or your chosen compatible AI provider) into the designated field. You can typically find this on the OpenRouter.ai website.
- Select an AI Model from the dropdown list. This list populates after a valid API key is entered. Many free-tier models are available and recommended for initial setup.
- Define Knowledge Base & Bot Rules: Fill in the "Knowledge Base" and "Bot Rules" text areas with information specific to your website/service and how you want the chatbot to behave. You can find helpful templates and suggestions in the "Guide" tab of the admin panel.
- Customize Chat Interface: Set your preferred "Chat Window Title" and "Welcome Message" that users will see.
- Review other settings like "Save conversations," "Language," "Show logo," etc., and adjust them as needed.
- Click the "Save Settings" button to apply your changes.
3. Integrating the Chatbot into Your Website
-
Identify the Correct URL Path: Determine the
web-accessible URL path to the directory where you uploaded the chatbot
files. For example, if you uploaded the files to a folder named
my-chatbot
in your website's root, the path would be/my-chatbot/
. -
Add the Embed Script to Your Pages: Edit the HTML code of the web pages where you want the chatbot to appear (or edit your CMS/framework's theme templates).
Insert the following JavaScript line just before the closing tag:
<script src="/your-chatbot-folder/embed.js" defer></script>
Important: Replace/your-chatbot-folder/
with the actual URL path to your chatbot installation directory. Examples:- If installed in the website's root directory:
- If installed in a sub-directory named "
ai-chat
":
-
The
defer
attribute in the script tag is recommended as it allows your page's HTML to load before the script is executed, improving perceived performance. Theembed.js
script will automatically create the floating chat button and the chat window (iframe) on your page.
Your chatbot should now be installed, configured, and visible on your website!
Category | Scripts & Code / PHP Scripts / AI |
First release | 31 May 2025 |
Last update | 31 May 2025 |
Software version | PHP 7.0, PHP 7.1, PHP 7.2, PHP 7.3, PHP 7.4, PHP 8.0, PHP 8.1, PHP 8.2, PHP 8.3 |
Files included | .php, .css, .html, Javascript .js |
Tags | customizable, multilingual, lead generation, customer support, chatbot, ai assistant, user engagement, automated responses, website helper, faq bot, free ai models, openrouter, php chatbot, javascript embed, live chat alternative |