How can I send and receive information from an Ubuntu Server

Hi, I want to make an Ubuntu Server, how would I be able to send my server info to that Ubuntu Server, and then have my server browser get the data, and when that button is clicked connect to the specified server?

Write a web Backend (eg PHP) and use normal GET and POST of json Data or use a REST API Server Software (or write your own)