Create pat.php

Terrible script is terrible, enjoy.