Commit e50709f0 authored by unknown's avatar unknown

add API file to the Chatbot

parent 3f8e4d07
<?php
$msg= $_GET['msg'];
$str = str_replace(' ', '%', $msg);
$requestingURL='http://127.0.0.1:5000/'.$str;
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $requestingURL,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
print_r($response);
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment