Static form submit API

I’m looking for an Static form process API script exactly/similar to this script

The above script is very old and doesn’t work on Latest technology/PHP 7

I can’t find any similar script here, can anyone guide me please?

if you want i can make you one using Laravel 5.5