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.
- estabilish session when user access site
- check session before answering ajax call
note, isn't bombproof, starting point.
Comments
Post a Comment