I am setup the user agent in the app for example “mobileapp”. Then I wantto add a condition to backend/web – if the user agent is “mobileapp” then hide the AdSense, otherwise show it. language/framework of my project is Laravel How can implement this in my website backend? I was try to find out various code for example hide and show content, I read also this one How to block google adsense in android webview I am not have experience in code here is what I try, am add this in core.php file in helpers
if(strstr(strtolower($_SERVER['HTTP_USER_AGENT']), "mobileapp"))
{
// hide adsense
}
what other need to be added