M
M
Maxim2020-05-07 21:35:31
PHP
Maxim, 2020-05-07 21:35:31

How can I disable the display of images or text? using a specific User-Agent?

Hello.
I heard that it is possible to disable the display of images or text using the User-Agent for a specific browser!
How it works? and how to implement it?

I've searched all over the internet and can't find anything

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim, 2020-05-13
@m4x1m-21

<?php if($_SERVER['HTTP_USER_AGENT'] == 'Название вашего User-Agent') { ?>

<style type="text/css">
  .page-content .sidebar-dropdown, .sidebar-dropdown {    // - Тут указываем что нужно убрать!
    display: none !important;
  }
</style>

<?php } ?>

I
Ivan Ivanov, 2020-05-07
@maksim_fix

Read the headers, and with a certain User-Agent disable
https://www.php.net/manual/en/function.getallheade...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question