Only load page if

Second this.

if ($_POST){
//code
}

Will stop refresh exploit (all browser requests are GET) however it won’t help with cURL.