I want to create a form that will send the text you typed in the text box to another server through curl. Sent text must be sent in JSON format. While creating the form in HTML is not a problem for me, it's PHP that is not so obvious to me.
My site uses Joomla version 3.6.x. Of course, after sending the text you should receive a response in JSON format, which should be displayed on the page.
Sent JSON looks like this:
{"inputtext":"Kilka godzin wcześniej doszło do rozmowy telefonicznej między prezydentem Dudą a Donaldem Trumpem, który niespodziewanie wygrał 8 listopada wybory prezydenckie w USA. Ambasador Wilczek zwrócił uwagę, że była to \"siódma rozmowa prezydenta-elekta z przywódcą kraju UE i pierwsza z przywódcą kraju z Europy Środkowo-Wschodniej, nie licząc Rosji i Ukrainy\", co jego zdaniem świadczy to o tym, że \"Trump traktuje Polskę poważnie\"."}
Response:
{"tags":[{"key":"USA","value":59},{"key":"Donald Trump","value":54},{"key":"UE","value":46},{"key":"Ukraina","value":31},{"key":"wilczek","value":19},{"key":"duda","value":17},{"key":"Rosja","value":7},{"key":"rozmowa telefoniczna","value":1},{"key":"ambasador","value":0}]}
Can someone be so kind and help me with this?