khaiphan/poe-reverse

This is an unofficial composer library designed to interact with Poe.com's Chatbot using PHP.

dev-main 2023-06-06 05:53 UTC

This package is not auto-updated.

Last update: 2024-09-20 21:44:15 UTC


README

Quora-Poe-Reverse is a Composer package that allows you to interact with Quora Poe.com using PHP code.

Language

Installation

The minimum required PHP version is 7.2.5

Use Composer to install the package.

Run the following command in the terminal:

composer require khaiphan/poe-reverse:dev-main

Chatbot

Below is a list of available chatbots in the Quora-Poe-Reverse package:

To use a chatbot in your PHP code, follow these steps:

  1. First, you need to include the autoloader in your PHP code:
require 'vendor/autoload.php';
  1. Next, create an instance of the Poe class and provide the cookie and the name of the chatbot. For example:
use KhaiPhan\Quora\Poe;

$poeSage = new Poe('p-b', 'Sage');

Make sure to replace p-b with the value of the p-b cookie obtained from the Quora Poe.com website. Replace Sage with the name of the chatbot you want to use.

  1. Then, call the getAnswer() method to retrieve the response from the chatbot. For example:
$answer = $poeSage->getAnswer('Hello');
echo $answer;

Note that you can create different chatbot objects by changing the chatbot name and cookie value.

License

This package is open-source and available under the MIT License.