besstop.mobi mobile_carrier mysql dumb

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

    #16
    Here is a php code how to use the database:


    first download country arrays script from HERE and place it in the same directory where you put this code:[/b]
    the countries.php gives error

    here is another array file

    [attachment=1346:countries.php]
    Attached Files

    Comment


      #17
      thanks gum it will help alot for my new script on which m working can u pls share script which tells phone number n operator of a user?
      get cheap web hosting ever AdzeHost
      ===================
      get free hosting for life time hostwebswap not allowed
      ===================
      get free cpanel web hosting free cpanel hostingwap are allowed
      ===================

      ===================

      Comment


        #18
        thanks gum it will help alot for my new script on which m working can u pls share script which tells phone number n operator of a user?[/b]
        You cant get the phone number...

        Download the latest db dumb to detect the operator.
        Advertise your mobile site for FREE with AdTwirl

        Comment


          #19
          Here is a php code how to use the database:


          first download country arrays script from HERE and place it in the same directory where you put this code:

          Code:
          <?php
          $db_host = "localhost";
          $db_user = "username";
          $db_pass = "password";
          $db_name = "database";
          $dbc = mysql_connect($db_host, $db_user, $db_pass);
          $dbs = mysql_select_db($db_name);
          
          $_dez_ip=getdezIP();
          
          $q = mysql_query("SELECT `cc`, `network` FROM `mobile_carrier` WHERE `num_min` <= &#39;".$_dez_ip."&#39; ORDER BY `num_min` DESC, `num_max` ASC LIMIT 1") or die("MySQL Error: ".mysql_error());  
          $info = mysql_fetch_array($q);
          mysql_close();
          
          $cc=$info[0];
          echo &#39;Network: &#39;.$info[1];     // Mobile network
          echo &#39;Country code: &#39;.$cc;    // Country code
          
          include("countries.php");      /* Include the country arrays to convert country code to country name */
          echo &#39;Country: &#39;.$countries[$cc];
          
          /* you can also download famfamfam flag icons from 
          [url]http://www.famfamfam.com/lab/icons/flags/  [/url]
          to show the country flag */
          
          // echo &#39;Country flag : [img]flags/&#39;.strtolower($cc).&#39;.gif[/img]&#39;;
          
          function getdezIP(){
              $IP = "";
              if (isSet($_SERVER)) {
                  if (isSet($_SERVER["HTTP_X_FORWARDED_FOR"])) {
                      $IP = $_SERVER["HTTP_X_FORWARDED_FOR"];
                  } elseif (isSet($_SERVER["HTTP_CLIENT_IP"])) {
                      $IP = $_SERVER["HTTP_CLIENT_IP"];
                  } else {
                      $IP = $_SERVER["REMOTE_ADDR"];
                  }
              } else {
                  if ( getenv( &#39;HTTP_X_FORWARDED_FOR&#39; ) ) {
                      $IP = getenv( &#39;HTTP_X_FORWARDED_FOR&#39; );
                  } elseif ( getenv( &#39;HTTP_CLIENT_IP&#39; ) ) {
                      $IP = getenv( &#39;HTTP_CLIENT_IP&#39; );
                  } else {
                      $IP = getenv( &#39;REMOTE_ADDR&#39; );
                  }
              }
              if (strstr($IP, &#39;,&#39;)) {
                  $ips = explode(&#39;,&#39;, $IP);
                  $IP = $ips[0];
              }
          
              if(empty($IP)) $IP=$_SERVER["REMOTE_ADDR"];
              else if(strtolower(trim($IP))==&#39;unknown&#39;) $IP=$_SERVER["REMOTE_ADDR"];
              
                       $numbers = preg_split( "/\./", $IP);
                       $dezip=($numbers[0] * 16777216) + ($numbers[1] * 65536) + ($numbers[2] * 256) + ($numbers[3]);
            return $dezip;
          }
          ?>
          i will update the database dumb as often as i can...
          if the code on above does not work properly with some of your users and you want to help this project please link to us like this: http://2wap.org/mobile_carrier.php?ref=besttop.mobi or http://2wap.org/mobile_carrier.php?ref=xchanger.mobi
          put after ref= your sites url without http:// , we dont want to steal your users we just want to get as many mobile networks to our database as we can, thanks.[/b]



          ITS WORKING BRO.ThankZ How can i add a country flag to this script

          Comment


            #20
            ITS WORKING BRO.ThankZ How can i add a country flag to this script[/b]
            see here

            // echo &#39;Country flag : [img]flags/&#39;.strtolower($cc).&#39;.gif[/img]&#39;;

            do it


            echo &#39;Country flag : [img]flags/&#39;.strtolower($cc).&#39;.gif[/img]&#39;;

            you can also download famfamfam flag icons from
            http://www.famfamfam.com/lab/icons/flags/
            to show the country flag */
            upload gif flags folder same place done
            left wap stuff

            Comment


              #21
              ok.ill try that bro

              Comment


                #22
                thanx its working fine.... hmmmmm at least it worked this morning lol

                when i tried it worked fine.... VIPNET.... Croatia.......flag was right etc



                buuuuuuuuut now it shows me tht im from United Kingdom and tht im using JERSEY-TELECOM-INFRA.......

                WTF???? when did i moved in UK???? LOL

                any1 knws whts the problem?? im using the same browser.......
                sigpiceeeeerrr....

                Comment


                  #23
                  thanx its working fine.... hmmmmm at least it worked this morning lol

                  when i tried it worked fine.... VIPNET.... Croatia.......flag was right etc
                  buuuuuuuuut now it shows me tht im from United Kingdom and tht im using JERSEY-TELECOM-INFRA.......

                  WTF???? when did i moved in UK???? LOL

                  any1 knws whts the problem?? im using the same browser.......[/b]
                  you are into a static or dynamic ip???

                  showing the phone number is possible in php for i saw one. i dont know the script but try to see it here. http://tribe.111mb.net you just have to register 1st though. and after you login, youll be in redirection page showing your phone number. im not promoting this site coz its not mine but i just want to let others see it. lolz and the admin ban users either by ip or phone number or both.

                  Comment


                    #24
                    you are into a static or dynamic ip???

                    showing the phone number is possible in php for i saw one. i dont know the script but try to see it here. http://tribe.111mb.net you just have to register 1st though. and after you login, youll be in redirection page showing your phone number. im not promoting this site coz its not mine but i just want to let others see it. lolz and the admin ban users either by ip or phone number or both.[/b]


                    dnt knw is it static or dynamic ip......... but now it shows me im from Saudi Arabia LOL...

                    but it may be cuz im browsing with opera 9.2.............................

                    cuz with the same sim card,(when im browsing with my phn) it shows corect country nd network.....

                    still opera 4 shows im from Saudi Arabia..lol ucweb also.....

                    i cnt test the opera 8.65 cuz it shows browser as mozilla nd its blocked at my site.....

                    so default browsers work fine and thts IT!!!!
                    sigpiceeeeerrr....

                    Comment


                      #25
                      you are into a static or dynamic ip???

                      showing the phone number is possible in php for i saw one. i dont know the script but try to see it here. http://tribe.111mb.net you just have to register 1st though. and after you login, youll be in redirection page showing your phone number. im not promoting this site coz its not mine but i just want to let others see it. lolz and the admin ban users either by ip or phone number or both.[/b]
                      we can see phone number but if user using proxy Gprs on phone with ip+port here
                      /////////////////////////////////////////////
                      $netinfo = getenv(HTTP_X_NETWORK_INFO); // we can see phone number

                      $xnetinfo = $_SERVER[&#39;HTTP_X_NETWORK_INFO&#39;]; // we can see phone number
                      /////////////////////////////////////////////
                      echo "user9: $netinfo
                      ";


                      echo "user13: $xnetinfo
                      ";

                      for example check here http://2-wap.net/user.php and in user9: or user13: u will see ur phone number


                      but user must use as i said if any other script anybody have then share here
                      left wap stuff

                      Comment


                        #26
                        In this script can i show the number of online person eg http://my.wapshare.us/htmlonline.php?id=3665 like and there country itz possible in it!

                        Comment


                          #27
                          In this script can i show the number of online person eg http://my.wapshare.us/htmlonline.php?id=3665 like and there country itz possible in it![/b]
                          ok now the point??

                          Comment


                            #28
                            I mean i should show like online40 index page when we click the 40 it should show the coututry flag,ip,brower can u get my point bro!

                            Comment


                              #29
                              not working 4 me... cnt c anythng there ......... only my IP nd browser
                              sigpiceeeeerrr....

                              Comment


                                #30
                                lol that was the script

                                Comment

                                Working...
                                X