javascript - Add ip address access permission to file by php code -


i want add ip address permission document file php code. example have document 'mydocument.doc', run php code add ip address access permission on file, this, particular ip address can opens document, if other ip wants open file alert message shown.

can body tell me possible or not, if possible how can this.

explanation:- if restrict file particular ip. ip can download file , read this, ok. if user send file user, can open file because there no restrication ip after download file. want users cant use file, because doesn't pay this. may understand want do

ip addresses should not being used authentication insecure or not practicable because of many reasons. example:

  • others spoof ip , pretend else
  • your ip might change (even frequently)
  • organizations use single public ip clients network. in case won't have chance identify single user anymore.
  • ...

i suggest protect file username , password. if using apache webserver example might configure in .htaccess file.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -