Tuesday, 12 February 2019

PHP : Prevent Direct Url Open

 <?php
    /* at the top of 'check.php' */
    if ( $_SERVER['REQUEST_METHOD']=='GET' && realpath(__FILE__) == realpath( $_SERVER['SCRIPT_FILENAME'] ) ) {
        /*
           Up to you which header to send, some prefer 404 even if
           the files does exist for security
        */
        header( 'HTTP/1.0 403 Forbidden', TRUE, 403 );

        /* choose the appropriate page to redirect users */
        die( header( 'location: /error.php' ) );

    }
?>



<?php


if (!isset($_SERVER['HTTP_REFERER'])){

echo "uh?"; }
else {

}

?>

Auto select after redirect to the contact page SELECT JAVASCRIPT

 https://domain.my/contact/?startup_package=UltimateImpact         <select name="startup_package" class="form-select"...