Why did php language redirect script wont work !! GRRRR

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pantymaniac
    Confirmed User
    • Feb 2003
    • 1192

    #1

    Why did php language redirect script wont work !! GRRRR

    Well i create a php called filter.php
    i put this in it
    After i add to my site like

    (<)?php include("filter.php"); ?(>)

    And when is my broser language is one below it works
    very slowly but it redirect

    when i make my browser language to english or german

    page dont want to load ??

    WTF WHY ???????


    -----------------------------------

    <?
    $DEFAULT_ROUTE='http://www.domain.com/';
    $redirect_map = array (
    'zh' => 'http://www.domain.com/free.php',
    'zh-cn' => 'http://www.domain.com/free.php',
    'zh-tw' => 'http://www.domain.com/free.php',
    'zh-sg' => 'http://www.domain.com/free.php',
    'zh-mo' => 'http://www.domain.com/free.php',
    'zh-hk' => 'http://www.domain.com/free.php',
    'tr' => 'http://www.domain.com/free.php',
    'ko' => 'http://www.domain.com/free.php',
    'ru' => 'http://www.domain.com/free.php',
    'ro' => 'http://www.domain.com/free.php',
    'cs' => 'http://www.domain.com/free.php',
    'fa' => 'http://www.domain.com/free.php',
    'hu' => 'http://www.domain.com/free.php',
    'pl' => 'http://www.domain.com/free.php',
    'bg' => 'http://www.domain.com/free.php',
    'ar' => 'http://www.domain.com/free.php',
    'yu' => 'http://www.domain.com/free.php',
    'mx' => 'http://www.domain.com/free.php',
    'ee' => 'http://www.domain.com/free.php',
    'ae' => 'http://www.domain.com/free.php',
    'sa' => 'http://www.domain.com/free.php',
    );
    $route = ($redirect_map[$_SERVER['HTTP_ACCEPT_LANGUAGE']]) ? $redirect_map[$_SERVER['HTTP_ACCEPT_LANGUAGE']] : $DEFAULT_ROUTE;
    //print $route;
    header("Location: $route");
    ?>


    -----------------:
    mad:
    Last edited by pantymaniac; 11-10-2003, 08:00 AM.
    This place is for RENT
  • JamesK
    hi
    • Jun 2002
    • 16731

    #2
    thanks for the script
    M3Server - NATS Hosting

    Comment

    • pantymaniac
      Confirmed User
      • Feb 2003
      • 1192

      #3
      Originally posted by Wildcard
      thanks for the script

      well , it doesnt work
      This place is for RENT

      Comment

      • Calvinguy
        Confirmed User
        • Oct 2002
        • 1752

        #4
        Probably the browser return the languagecode together with a iso-code

        Comment

        • Calvinguy
          Confirmed User
          • Oct 2002
          • 1752

          #5
          Take a look at stristr in the phpmanual

          Comment

          • 4Pics
            Confirmed User
            • Dec 2001
            • 7952

            #6
            What does print $route; show?

            I'll try it and see what I get

            Comment

            • TheJimmy
              ICQ- five seven 0 2 5 5 0
              • Jan 2001
              • 10747

              #7
              BossHawg used to have a nice one up somewhere on pornresource but I can't find the link now
              Investor with 5m - 15m USD to invest. Do you have a site or network of sites earning 50k - 200k a month income? Email your contact and preliminary data to: domain.cashventures (at) gmail.com....Please...no tire kickers...serious offers and inquiries only.

              Comment

              • TheJimmy
                ICQ- five seven 0 2 5 5 0
                • Jan 2001
                • 10747

                #8
                try this...

                http://sourceforge.net/projects/l-redirector/
                Investor with 5m - 15m USD to invest. Do you have a site or network of sites earning 50k - 200k a month income? Email your contact and preliminary data to: domain.cashventures (at) gmail.com....Please...no tire kickers...serious offers and inquiries only.

                Comment

                • pantymaniac
                  Confirmed User
                  • Feb 2003
                  • 1192

                  #9
                  thanks for da help but

                  i want to know why the one i gave dont working

                  must work like a charm
                  This place is for RENT

                  Comment

                  Working...