E
E
Eugene2017-03-21 18:03:09
PHP
Eugene, 2017-03-21 18:03:09

How to restrict access to data given in JSON through PHP?

I have data in JSON form at a certain address, on the project.
Tell me how you can limit the output, according to the source of their appeal. Those. now anyone accessing a certain URL (knowing it) can see this data.
How to make a filter by IP or domain from which the request comes?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
hufawoso, 2017-03-21
@hufawoso

php.net/manual/en/features.http-auth.php

P
Pavel, 2017-03-21
@PavelFokeev

As an option - use the additional parameter $_GET / $_POST, or http header.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question