Requesting predictions from rasa nlu server from php file

I am using rasa open source, I want to use nlu only and request predictions from it in a PHP file.

I run my server using this command: rasa run --enable-api -m models/nlu-20190515-144445.tar.gz

Now, I want to get predictions from the server in a PHP file. Please guide me on sending user messages from the PHP file and getting the intent and entities from the rasa nlu server in the file. In the PHP file, I want to run database queries based on the results from the rasa server.

Rasa says, you can use curl like: curl localhost:5005/model/parse -d ‘{“text”:“hello”}’

But I don’t know how to use it in a PHP file.

@hasnatkhalid75 Can you share some file’s or some example? You want to use PHP file or want’s a response in PHP?