Lavalair Browser Block

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Lavalair Browser Block

    ok heres a handy code 2 block a browser from db that i made

    Code:
    function blocked_browser($str,$uid)
    {
    $res=mysql_query("SELECT browser FROM ibwf_blocked");
    while($row=mysql_fetch_array($res)){$sites[]=$row[0];}
    for($i=0;$i<count($sites);$i++)
    {
    if(substr_count($str,$sites[$i])>0){
    echo "<card id=\"main\" title=\"Error\">";
    echo "<p align=\"center\">";
    echo "<img src=\"images/notok.gif\" alt=\"\"/>
    
    [b]Error!!! Login Failed...[/b]
    
    
    [b]This error happens usually when Using java/opera mini or another blocked browser[/b]
    
    
    pls use ur mobile/pc main browser</p></card></wml>";
    exit();
    }
    }
    }
    heres the sql u need to make

    CREATE TABLE `ibwf_blocked` (
    `id` int(11) NOT NULL auto_increment,
    `site` varchar(255) NOT NULL default &#39;&#39;,
    `browser` varchar(255) NOT NULL default &#39;&#39;,
    PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;



    for this function u need to put only part of a browser name u want to block like Anonymouse will block the browser http://Anonymouse.org as its shown

    also put the function under the connectdb part like this

    blocked_browser($_SERVER["HTTP_USER_AGENT"],getuid_sid($sid));

    #2
    ok heres a handy code 2 block a browser from db that i made

    Code:
    function blocked_browser($str,$uid)
    {
    $res=mysql_query("SELECT browser FROM ibwf_blocked");
    while($row=mysql_fetch_array($res)){$sites[]=$row[0];}
    for($i=0;$i<count($sites);$i++)
    {
    if(substr_count($str,$sites[$i])>0){
    echo "<card id=\"main\" title=\"Error\">";
    echo "<p align=\"center\">";
    echo "<img src=\"images/notok.gif\" alt=\"\"/>
    
    [b]Error!!! Login Failed...[/b]
    
    
    [b]This error happens usually when Using java/opera mini or another blocked browser[/b]
    
    
    pls use ur mobile/pc main browser</p></card></wml>";
    exit();
    }
    }
    }
    heres the sql u need to make

    CREATE TABLE `ibwf_blocked` (
    `id` int(11) NOT NULL auto_increment,
    `site` varchar(255) NOT NULL default &#39;&#39;,
    `browser` varchar(255) NOT NULL default &#39;&#39;,
    PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
    for this function u need to put only part of a browser name u want to block like Anonymouse will block the browser http://Anonymouse.org as its shown

    also put the function under the connectdb part like this

    blocked_browser($_SERVER["HTTP_USER_AGENT"],getuid_sid($sid));[/b]

    u havent made the codeing intructions that easy after the code is put iin core whatnext really be more specific

    Comment


      #3
      i said u gota put the blocked_browser($_SERVER["HTTP_USER_AGENT"],getuid_sid($sid)); under the connectdb function in ur script pages

      Comment


        #4
        please give more information on how to make use of this script. where and how do u put browser names to block it?
        Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

        <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

        Comment


          #5
          don&#39;t u think thats too complicated? a simple flat base script would be more handy! i made one for a friend&#39;s site.

          Comment


            #6
            Yea u wont need to add all the names of sites that gives anonymous browsing.. if u just block http:// dat wud block most of the sites...

            Comment

            Working...
            X