Firefox Addon Check

free web hosting
Free Web Hosting > Computers & Tech > Programming > Scripting > PHP

Firefox Addon Check

Normano
I saw a site that check if i have a ad-block addon in firefox but cant find something like that on google or similar.
I know it exist php scripts that show what browser I have
CODE
<?php
$useragent = $_SERVER[‘HTTP_USER_AGENT’];

if (preg_match(‘|MSIE ([0-9].[0-9]{1,2})|’,$useragent,$matched)) {
    $browser_version=$matched[1];
    $browser = ‘IE’;
} elseif (preg_match( ‘|Opera ([0-9].[0-9]{1,2})|’,$useragent,$matched)) {
    $browser_version=$matched[1];
    $browser = ‘Opera’;
} elseif(preg_match(‘|Firefox/([0-9\.]+)|’,$useragent,$matched)) {
        $browser_version=$matched[1];
        $browser = ‘Firefox’;
} elseif(preg_match(‘|Safari/([0-9\.]+)|’,$useragent,$matched)) {
        $browser_version=$matched[1];
        $browser = ‘Safari’;
} else {
        // browser not recognized!
    $browser_version = 0;
    $browser= ‘other’;
}

print “browser: $browser $browser_version”;
?>
Please help biggrin.gif

 

 

 


Reply

bcarasco
There's no real way to detect a popup blocker in PHP but it is pretty easy in JavaScript.
CODE
<script type="text/JavaScript" language="JavaScript">
var mine = window.open('','','width=1,height=1,left=0,top=0,scrollbars=no');
if(mine)
var popUpsBlocked = false
else
var popUpsBlocked = true
mine.close()
</script>


Just insert that in the HEAD of your code and wether or not their browser blocks popups will be stored in the popUpsBlocked variable.

Reply

Normano
Lol i tought it was php they used, but now I think its javascript, they used code like this
in a file advertisement.js
CODE
document.write('<style type="text/css"> .hideitblock2 {visibility:invisible;display:none;}</style>');

in the index file
CODE
<script type="text/javascript" src="advertisement.js"></script><noscript><style type="text/css"> .hideitblock2 {visibility:invisible!important;display:none!important;}</style></noscript>
<table class="hideitblock2" style="position:absolute;top:0px;left:0px;background-color:#000000;" width="100%" height="100%">
<td width="100%" height="100%">
<h1 align="center"><font color="ff0000">Please Disable Ad-Block or Add Instantz.net To Your Whitelist To View This Website Properly.</h1>
</td>
</table>
the code come from http://www.instantz.net/, thanks for the help anyway biggrin.gif

 

 

 


Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. firefox javascript check addon installed - 2.66 hr back. (1)
  2. runescape firefox browser trouble - 16.75 hr back. (1)
  3. positioning firefox window.open 2.0 - 21.01 hr back. (1)
  4. check html firefox - 22.50 hr back. (1)
  5. firefox dns add-on - 24.25 hr back. (1)
  6. scrollbar-face-color declaration dropped - 42.85 hr back. (1)
  7. grammar check add on firefox - 42.85 hr back. (1)
  8. firefox addon check - 65.52 hr back. (1)
  9. check addon firefox - 91.12 hr back. (1)
  10. how detect firefox addon with php - 116.98 hr back. (1)
  11. check css addon firefox - 141.42 hr back. (1)
  12. firefox free addon ad blocker - 163.57 hr back. (1)
  13. addon bookmark check - 188.89 hr back. (1)
  14. check height javascript firefox - 192.42 hr back. (1)
Similar Topics

Keywords : firefox addon


    Looking for firefox, addon, check

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for firefox, addon, check
advertisement




Firefox Addon Check



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE