I want to use youtube api to log some statistics about video playing on the client side
but javascript can’t create and write files on the client side,
I need to use javascript to transfer statistics to the server side and collect statistics on the server side
but I hope these statistics will not be transmitted via network
can I set up a php server with sql database on the same machine where the client resides
so I create a html5 page(with embeded youtube video and javascripts for statistics) on the server, and user browser on the same machine to visit the html5 page, then transmit the packet via localhost?
thanks!
You can send statistics by making AJAX requests and storing them in the DB on server itself. Localstorage on the client is not visible across all domains.