php - Restrict web api to web server -


this question has answer here:

currently when want data database through ajax use external php file grabs data database mysqli , echoes results , sends data ajax.

i want change more effective solution. thought first change php file outputs json data future projects , easier data managament. don't want else able access data directly other through website. , since can see ajax connection inspecting website it's easy find out.

i don't want become place can access raw json data , build own applications/websites from.

what other solutions there? web server should able access it.

  1. estabilish session when user access site
  2. check session before answering ajax call

note, isn't bombproof, starting point.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -