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.

Installation and Configuration Guide for Mail Validator Script

This document provides instructions on how to install and configure the Mail Validator PHP script. The script is designed to validate email addresses and uses various APIs and services. The configuration for these services and other site settings are managed through the site-config.php file.

Configuration File (site-config.php)

The site-config.php file contains essential configuration settings for the Mail Validator script. You can find this file in the includes folder. Below is a breakdown of each variable in the file and instructions on how to modify them.

Site Path and URL

This variable defines the absolute path to the script on your server and the domain you wish to use the script on. 

Example:

$sitepath = "/path/to/mail-validator";
$domainURL = 'https://yourdomain.com';



Google AdSense

$adsenseID: If you want to display Google AdSense ads, provide your AdSense Publisher ID here.


Google reCAPTCHA Keys

To begin, you need a Google account. If you don’t have one, create it at Google Accounts.

Visit the Google reCAPTCHA website and click on the “Admin Console” button, usually located in the top right corner. You'll be prompted to sign in with your Google account if you haven't already.

Once in the Admin Console, you'll see an option to register a new site. Click on “+” or “Register a new site.”
Step 4: Choose reCAPTCHA Type: reCAPTCHA v2: This version asks users to complete a challenge, like identifying objects in images and select "I'm not a robot" tickbox.



Add your website's domain (e.g., example.com). This is to ensure that the reCAPTCHA key is only used for your website. Accept the reCAPTCHA Terms of Service. Optionally, you can choose to receive alerts about your reCAPTCHA service (recommended).

$recaptcha_site_key and $recaptcha_secret_key: These are your site's keys for Google reCAPTCHA. Add them to your site-config.php file with your own keys obtained from Google.

Stripe Payments


If you don't already have a Stripe account, you need to create one. Go to the Stripe website and sign up for an account. Follow the registration process, which includes providing your email, creating a password, and then filling in details about your business.

Once your account is set up and you've logged in, you will be taken to the Stripe Dashboard. This is the central place where you can manage your Stripe account, view transactions, manage payments, etc. In the Stripe Dashboard, navigate to the "Developers" section. You can find this in the sidebar menu or sometimes at the top of the dashboard.


Under the "Developers" section, click on "API keys." Here you will find your API keys.
There are two types of keys: Publishable Key and Secret Key. The publishable key is used in front-end (client-side) requests, while the secret key is used for server-side requests.

$stripe_key: This is your secret API key for Stripe. It is used for processing payments.

$stripe_key = "your-stripe-secret-key";

Pricing for Email Validations

You can set your own prices for how much bulk validations will cost.

$price100, $price300, $price1000: These variables define the prices for 100, 300, and 1000 email validations, respectively. Prices should be in cents.


Understanding the Tokens File Format

In your tokens.txt file, each line represents a token and its associated value or usage limit. The format appears to be token,limit, where:

  • token: This is a unique identifier or code that represents the token.
  • limit: This is an integer that represents the limit or value associated with the token, such as the number of validations or uses that the token allows.

Valid Tokens: A standard entry for a valid token looks like token500,500. In this example, token500 is the token, and 500 is the limit or number of uses assigned to it.

Commented Tokens: Lines beginning with # are treated as comments. For example, #token2,500 is a commented line and is typically ignored by the script. This can be used to deactivate tokens without deleting them. Once a token is fully used the script will automatically add a # to deactivate the token. 

How Tokens are Used
When a user inputs a token into your system, the system checks this tokens.txt file to find a matching token. If a match is found, the system then checks the associated limit. For example, if the token is token11 with a limit of 1, the system allows whatever service or validation the token is meant to permit once.

After a token is used, the system may decrement the limit in the file, indicating that one use has been consumed. For a token with a limit of 1, this means it can't be used again.

Managing Tokens
Adding Tokens: To add a new token, simply add a new line with the token and its limit. For example, adding newtoken,100 allows newtoken to be used 100 times.

Removing Tokens: To remove a token, delete its line from the file, or comment it out by adding # at the beginning of the line.

Modifying Tokens: To change a token's limit, edit the number after the comma. Be cautious when increasing limits on existing tokens to avoid unauthorized excess usage.

Bulk Email Checker API Key


This is the API key for Bulk Email Checker, a service used for email validation. You can sign up for a free account here. Once signed up you can purchase a token pack of validations. 1000 validations can be purchased for $2.95. 

Upload Files: Upload the script files to your web server.
Configure site-config.php: Modify the site-config.php file with your specific configuration settings as described above.

Test the Script: Access the script via your web browser to ensure that it is correctly configured and functioning.

Setting Up Cron Jobs

Once logged into cPanel, scroll down to the “Advanced” section, or use the search bar to find the “Cron Jobs” tool.

Click on “Cron Jobs” to open the cron job management area.

Set up a New Cron Job

In the Cron Jobs section, you’ll find an area to add a new cron job.

Adding the Cron Job for Deleting Old Files

Common Settings: Select a common setting if applicable (e.g., “Once a day” for a daily task). Alternatively, set the time and frequency manually. For daily execution at 1 AM, set Minute to 0, Hour to 1, and leave Day, Month, and Weekday as *.

Command: Enter the command to run your script. It should look like this:

/usr/bin/php -q /home/www/example.com/includes/delete_old_files.php

Repeat the same steps for the processing script. If it needs to run every hour, set Minute to 0 and leave the rest as *.
Command: 

/usr/bin/php -q /home/www/example.com/process.php

This simple guide should assist you in setting up the necessary cron jobs for your Mail Validator script. Regularly monitor your cron jobs and logs to ensure they are executing as expected.

Unix/Linux File Permissions


No Permissions for Others: To maintain security, other users (group and others) should not have any permissions on this file. This prevents unauthorized reading or altering of the token data and config file.

Setting Permissions: A common and secure permission setting for such a file is 600 (read and write permissions for the owner only). You can set this using the chmod command or by modifying the permissions of these files in the file manager.

The two files that need permission changes to 600:
  • site-congif.php
  • tokens.txt

Troubleshooting

If you encounter issues, check your server logs for errors.
Ensure that all API keys and URLs are correctly entered and valid.

Install IP Lookup Script


Introduction


This guide will walk you through the process of uploading and installing a 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

  • PHP 8.x or PHP 7.x
  • Storage & Public Directories writable.
  • BCMath PHP Extension
  • Ctype PHP Extension
  • Fileinfo PHP Extension
  • JSON PHP Extension
  • Mbstring PHP Extension
  • OpenSSL PHP Extension
  • PDO MySQL PHP Extension
  • Tokenizr PHP Extension
  • XML PHP Extension
  • cURL PHP Extension
  • INTL PHP Extension
  • Affiliate account with Thexyz
  • Affiliate account with Shareasale
  • Godaddy API Key
  • Google Recapture
  • whoisjson.com API key
  • whoisxmlapi.com 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. Site Name:

$site_name = "Your Site Name";

Here, you need to replace "Your Site Name" with the actual name you'd like to display for your website.

For instance, if your website's name is "My Cool Website", then you'd edit it as:

$site_name = "My Cool Website";

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.

3. Google Analytics:

$google_analytics_code = "
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src='https://www.googletagmanager.com/gtag/js?id=YOUR-GA-MEASUREMENT-ID'></script>
    ...
";
Replace YOUR-GA-MEASUREMENT-ID in both places with your actual Google Analytics Measurement ID. This ID usually starts with UA- followed by a series of numbers.

4. Google reCAPTCHA Keys:

$recaptcha_site_key = "6Lcq51YfAAAAAFmL9Ov2U-DEkXLYkLvohkzUf9F2";
$recaptcha_secret_key = "6Lcq51YfAAAAAISuJtib6QvBkl5_1vLRUwAKOuWl";

Replace the placeholder values with the actual reCAPTCHA keys you get from the Google reCAPTCHA website.

5. Social Media Links:

Replace the placeholder URLs with your actual social media profile URLs:

$facebook_link = "https://www.facebook.com/yourprofile";
$twitter_link = "https://twitter.com/yourprofile";
//... and so on.

6. Affiliate IDs:

$namecheap_aff = "xkb4j3";
$thexyz_aff = "1";

Replace the placeholder values with your actual affiliate IDs provided by Namecheap, Thexyz, and any other affiliate programs you're working with.

7. API Keys:

$whoisjson_api = "252202a85b3968c4f23df6ae3670187b14f9e9f9c43c940d24897cbd7955d188";
$godaddy_api = "252202a85b3968c4f23df6ae3670187b14f9e9f9c43c940d24897cbd7955d188";
$whoisxmlapi_api = "at_37hskrdJynCZ1YrxCnqlRQcpggAC4";

Replace the above placeholders with the actual API keys you receive from these services. You can find some links to the services so you can sign up for an account and generate your own unique affiliate IDs.

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.

CP Web Tools Changelog

# Changelog

All notable changes to this project will be documented in this file.

## [1.0.2] - 2024-01-16

- Added Open AI ChatBot.

- Added Mortgage Calculator.

- Added Percentage Calculator.

- Added Email Address Validator.

## [1.0.1] - 2023-11-04

- Mailto Link Generator functionality allowing users to create `mailto:` links with customizable email address, subject, and body content.

- Google reCAPTCHA integration on the Mailto Link Generator form to validate user authenticity.

- Copy to clipboard feature for the generated `mailto:` HTML code snippet.

- User feedback with an alert notification when the `mailto:` HTML code is copied to the clipboard.

- Adeed Godaddy API with domain name suggestion tool.

- Added password generator

- Fixed an issue with Namecheap affiliate links. Now using Shareasale instead of Impact. 

- Adjusted CSS to ensure that button text remains white across all states in the Domain Checker feature.


## [1.0.0] - 2023-11-02

- Initial release



Install CP Web Tools

Introduction


This guide will walk you through the process of uploading and installing a 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 8.x or PHP 7.x
  • Storage & Public Directories writable.
  • BCMath PHP Extension
  • Ctype PHP Extension
  • Fileinfo PHP Extension
  • JSON PHP Extension
  • Mbstring PHP Extension
  • OpenSSL PHP Extension
  • PDO MySQL PHP Extension
  • Tokenizr PHP Extension
  • XML PHP Extension
  • cURL PHP Extension
  • INTL PHP Extension

APIs and Affiliate Accounts

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. Site Name:

$site_name = "Your Site Name";

Here, you need to replace "Your Site Name" with the actual name you'd like to display for your website.

For instance, if your website's name is "My Cool Website", then you'd edit it as:

$site_name = "My Cool Website";

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.

3. Google Analytics:

$google_analytics_code = "
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src='https://www.googletagmanager.com/gtag/js?id=YOUR-GA-MEASUREMENT-ID'></script>
    ...
";
Replace YOUR-GA-MEASUREMENT-ID in both places with your actual Google Analytics Measurement ID. This ID usually starts with UA- followed by a series of numbers.

4. Google reCAPTCHA Keys:

$recaptcha_site_key = "6Lcq51YfAAAAAFmL9Ov2U-DEkXLYkLvohkzUf9F2";
$recaptcha_secret_key = "6Lcq51YfAAAAAISuJtib6QvBkl5_1vLRUwAKOuWl";

Replace the placeholder values with the actual reCAPTCHA keys you get from the Google reCAPTCHA website.

5. Social Media Links:

Replace the placeholder URLs with your actual social media profile URLs:

$facebook_link = "https://www.facebook.com/yourprofile";
$twitter_link = "https://twitter.com/yourprofile";
//... and so on.

6. Affiliate IDs:

$namecheap_aff = "xkb4j3";
$thexyz_aff = "1";

Replace the placeholder values with your actual affiliate IDs provided by Namecheap, Thexyz, and any other affiliate programs you're working with.

7. API Keys:

$whoisjson_api = "252202a85b3968c4f23df6ae3670187b14f9e9f9c43c940d24897cbd7955d188";
$godaddy_api = "252202a85b3968c4f23df6ae3670187b14f9e9f9c43c940d24897cbd7955d188";
$whoisxmlapi_api = "at_37hskrdJynCZ1YrxCnqlRQcpggAC4";

Replace the above placeholders with the actual API keys you receive from these services. You can find some links to the services so you can sign up for an account and generate your own unique affiliate IDs.

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.