Google AI api, import data in json php

162
July 14, 2017, at 08:46 AM

I woul know if exist in php a system can import data into AI API of google ?

Also if I creat a json like that, do you think the import must work correctly ? Do you know if something exist in php to create a google AI json structure ? Thank you

{
 "lang": "en",
 "result": {
  "metadata": {
   "webhookUsed": "false",
   "webhookForSlotFillingUsed": "false",
   "intentName": "question1 test"
  },
  "fulfillment": {
   "speech": "reponse user test",
   "messages": [
    {
     "type": "simple_response",
     "platform": "google",
     "textToSpeech": "reponse user test"
    },
    {
     "type": "basic_card",
     "platform": "google",
     "title": "title product",
     "formattedText": "text description",
     "image": {
      "url": "http://product.jpg"
     },
     "buttons": [
      {
       "title": "http:://weblinkProduct_title.com",
       "openUrlAction": {
        "url": "http:://weblinkProduct_title.com"
       }
      }
     ]
    },
    {
     "type": 0,
     "speech": "reponse user test"
    }
   ]
  },
  "score": 1
 }
}
READ ALSO
How efficiently this controller action can be written more in phalcon?

How efficiently this controller action can be written more in phalcon?

I am trying to delete data from two tables which are associated with each other but I want to know that how it can be written more efficiently in phalcon as I am doing it right now through the normal PHP loop method

164
How to prevent html code from being written to the “database”?

How to prevent html code from being written to the “database”?

The working principle of my code is the following: if in the input line there are have such smileys (":)", ":(") then you need to replace them with picturesHere's how I do it:

160
How do I echo rows that have a specific variable in it from Database

How do I echo rows that have a specific variable in it from Database

So first off my database table is set up like this:

160