Web Analytics Made Easy -
StatCounter Open with only one browser permission - CodingForum

Announcement

Collapse
No announcement yet.

Open with only one browser permission

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

  • Open with only one browser permission

    I want to make that my web page ( HTML ) can be opened with only one Internet Browser - Opera

    Is this possible to meke, and does someone knows how ?

  • #2
    Well... I'm not sure about opening in only opera but I would use PHP.


    You can use a built-in function to retrieve what browser the visitor is using and store it as $_SERVER["HTTP_USER_AGENT"]. Then simply use if else statements to stipulate the behavior for when the visitor is using opera or something else.

    echo a message like "Good work using" . $_SERVER["HTTP_USER_AGENT"] . "to view my page!" or something if they use opera
    and redirect them to some error page otherwise. This is an annoying script and I don't support its use. But if you want the details, make a post in the php forum.
    Once I thought I was wrong but I was mistaken.

    Comment


    • #3
      well u did not help me directly but u gave me idea how could i do this...

      i will tryed with javascript 'cause this is HTML page...

      Comment


      • #4
        You won't be able to do it successfully with html and javascript...

        Yes you can find the user agent with javascript - eg.

        function isopera() {
        var agt=navigator.userAgent.toLowerCase();
        if (agt.indexOf("opera") != -1) return 'Opera';
        }

        ... but don't forget javascript can easily be disabled.

        Why do you need to do this anyway?
        markaylward.co.uk

        Comment


        • #5
          In fact, the only thing Opera is good at is probably disguising itself.
          So you will effectively filter out the major part of its users by setting useragent-string filters.
          You should use some opera-specific js construct if you want to do it, but as it was already mentioned js can be disabled.

          Comment


          • #6
            Or you could read my post and take this to the appropriate forum... the PHP one. There they can fill in the details of what I told you to do because I don't have the time or inclination to learn how to do this for you.
            Once I thought I was wrong but I was mistaken.

            Comment

            Working...
            X