Chat with Us!
$message

"; } } // Handle form submission if ($_SERVER["REQUEST_METHOD"] == "POST") { $userMessage = $_POST['userMessage']; if (!empty($userMessage)) { $_SESSION['chat_history'][] = "User: " . htmlspecialchars($userMessage); // OpenAI API request logic $apiKey = 'YOUR_OPENAI_API_KEY'; // Replace with your API key $url = 'https://api.openai.com/v1/chat/completions'; $data = [ 'model' => 'gpt-3.5-turbo', 'messages' => [['role' => 'user', 'content' => $userMessage]], ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Authorization: Bearer ' . $apiKey, ]); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); $response = curl_exec($ch); curl_close($ch); // Decode the JSON response $responseData = json_decode($response, true); $botResponse = isset($responseData['choices'][0]['message']['content']) ? $responseData['choices'][0]['message']['content'] : "Sorry, I couldn't process that."; $_SESSION['chat_history'][] = "Bot: " . htmlspecialchars($botResponse); } else { echo "

Error: Message is empty

"; } } ?>

API

HTTP Method POST
API URL https://pakcheapestsmmpanel.com/api/v2
Return format JSON

Service List

parameters Explanation
key Your API Key
action services

Sample return

[
    {
        "service": 1,
        "name": "Followers",
        "type": "Default",
        "category": "First Category",
        "rate": "0.90",
        "min": "50",
        "max": "10000"
    },
    {
        "service": 2,
        "name": "Comments",
        "type": "Custom Comments",
        "category": "Second Category",
        "rate": "8",
        "min": "10",
        "max": "1500"
    }
]

New order

Parameter Explanation
key Your API Key
action add
service Servis ID
link Service connection
quantity Quantity
runs (optionally) Runs to deliver
interval (optionally) Interval in minutes

Sample return

{
    "order": 23501
}

Order status

Parameter Explanation
key Your API Key
action status
order Order ID

Sample return

{
    "charge": "0.27819",
    "start_count": "3572",
    "status": "Partial",
    "remains": "157",
    "currency": "USD"
}

User balance

Parameter Explanation
key Your API Key
action balance

Sample return

{
    "balance": "100.84292",
    "currency": "USD"
}
Sample PHP file
Your Chatbot

Your Chatbot

Chat with Us!
$message

"; } } // Handle form submission if ($_SERVER["REQUEST_METHOD"] == "POST") { $userMessage = $_POST['userMessage']; if (!empty($userMessage)) { $_SESSION['chat_history'][] = "User: " . htmlspecialchars($userMessage); // OpenAI API request logic $apiKey = 'YOUR_OPENAI_API_KEY'; // Replace with your API key $url = 'https://api.openai.com/v1/chat/completions'; $data = [ 'model' => 'gpt-3.5-turbo', 'messages' => [['role' => 'user', 'content' => $userMessage]], ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Authorization: Bearer ' . $apiKey, ]); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); $response = curl_exec($ch); curl_close($ch); // Decode the JSON response $responseData = json_decode($response, true); $botResponse = isset($responseData['choices'][0]['message']['content']) ? $responseData['choices'][0]['message']['content'] : "Sorry, I couldn't process that."; $_SESSION['chat_history'][] = "Bot: " . htmlspecialchars($botResponse); } else { echo "

Error: Message is empty

"; } } ?>
WhatsApp