Install the ChatBot Script

 

Introduction


This guide will walk you through the process of uploading and installing the ChatBot PHP script to your web server. By the end of this guide, you should have your PHP script successfully installed and configured.

Prerequisites

  • A web hosting account that supports PHP.
  • FTP access to your web server or a web-based file manager provided by your hosting provider.
  • A zipped file containing your PHP script.
  • A text editor (like Notepad for Windows, TextEdit for macOS, or any code editor).

Requirements

Most of these should be included in any hosting service. We have tested the script on various Linux hosting environments and it should also work on a Windows server,
  • PHP 7.4 or higher.
  • Curl enabled for PHP.
  • Server with PHP sessions support.

APIs and Affiliate Accounts

  • Open AI API Key

Step-by-step Guide

1. Uploading the PHP Script to Your Web Server:
Using FTP:

Launch your FTP client (e.g., FileZilla, Cyberduck).
Connect to your web server using the credentials provided by your hosting provider.
Navigate to the directory where you'd like to install the PHP script.
Upload the zipped file containing your PHP script to this directory.

Using a Web-based File Manager:


Log into your web hosting control panel.
Navigate to the file manager.
Go to the directory where you'd like to install the PHP script.
Use the "Upload" option to upload the zipped file.
2. Unzipping the Files:
Using FTP: Most FTP clients do not support unzipping files directly on the server. You'd need to unzip the file on your computer and then re-upload the extracted files to your server.

Locate and open the site-config.php file.


Make the following changes:

1. Open AI API key:

$OPENAI_API_KEY = "############";
Replace the above placeholders with the actual API keys you receive from Open AI.

For instance, if your API key is "sk-ABr454455VYZVyZ", then you'd edit it as:

$OPENAI_API_KEY = "sk-ABr454455VYZVyZ";

2. Ad Code:

$ad_code = "
    <!-- Your Ad Code Here -->
";

If you have any advertisement code you'd like to integrate into your website (e.g., Google AdSense code, or any other ad network code), replace <!-- Your Ad Code Here --> with that ad code.

Wrapping Up


You've now successfully uploaded, extracted, and configured your PHP script on your web server. It's essential to test the functionality of the script to ensure everything works as expected. Navigate to the URL where you uploaded the script and test the features.

Note: Always keep your API keys and sensitive information confidential. Sharing this document with others might expose important credentials. Regularly back up your configurations and consider encrypting sensitive information for added security.