M
M
mihailuoih2020-05-31 23:12:13
PHP
mihailuoih, 2020-05-31 23:12:13

How to check if a user has viewed ads using php?

I have an application using php backend. Let's say this is an application for buying views on YouTube, or something else where points are very important. I want to implement the crediting of points for viewing ads, but I don't know how to do it. I can of course send a request to the server when the ad has been viewed

@Override
    public void onAdOpened() {
            //Запрос на сервер
    }
, but I'm afraid that a person, having rummaged in the code of my application, will easily find what request I am sending, and will be able to easily emulate my requests to cheat points. How can I avoid this? For example, is it possible to somehow check from the server whether the advertisement has been viewed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SEOD, 2020-05-31
@mihailuoih

So encrypt the request and send it encrypted to the server, checking the integrity of the data for immutability. Include the lookup time in the request to prevent an attacker from sending the same request. Analyze the IP of the request so that it does not repeat. If you add additional data (about the user's behavior, when he opened the ad, how much time he spent, how he behaved in the application), it will be difficult to fake such a request and you will understand whether it is a real person or a bot.
The harder you make it, the harder it will be to hack.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question