Executing a PHP function via JQuery ajax

I know it is not possible to simply call a function through ajax. As it only sends data via HTTP headers. However, I am trying to achieve something. I’m trying to execute a piece of PHP code, by the click of a button. The code consists of a shell_exec(<do shell command here>)
So my ultimate goal is, to have a page load, display a button, which in turn, once clicked, will execute this piece of code (shell command).

I have looked for solutions and have not found one, even though there have been a lot of questions asked with a similar title to mine.

How can I achieve this concept?

The.Vampire.Diaries.S06E02.720p.WEB-DL.2CH.x265.HEVC-PSA.mkv

Category: Tv
Seeds: 0
Leechers: 0
Size: 158 MB

More info at TorrentFunk.com

Unity 5.0 32 bit, 64 bit, Mac

Category: Applications
Seeder: 80
Leecher: 128
Size: 2 GB

See more @ TorrentR.eu