php - How to check how the web resource is requested? -
using php, there way check how web server resource requested while minimising room forging , hacking? or in simpler terms, how check whether hyperlink click, direct url, submission of html form, programmatic access etc.?
what if tools other php used?
you can't create bullet proof way, start $_server.
for illustration $_server['request_method'] can determine if request get/post/put/...
regarding link click or direct access: $_server['http_referer'] might help.
at lastly $_server['request_uri'] might hold useable info, determine if script run on webserver (like apache) or console.
please see documentation more info on that.
and mentioned before: you can't sure of here, if want info, , not utilize security reasons, fine.
if want security need possibilities .htaccess.
php web
No comments:
Post a Comment