filter_input example for $_SERVER["SCRIPT_FILENAME"] Example: get full url php $fullURL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];